Skip to content

Instantly share code, notes, and snippets.

View GuyHoozdis's full-sized avatar

Guy Hoozdis GuyHoozdis

View GitHub Profile
@GuyHoozdis
GuyHoozdis / GitHubMarkdownEmojis.md
Last active July 27, 2024 13:13 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@GuyHoozdis
GuyHoozdis / debugging-editorconfig.md
Created July 18, 2024 16:47
Verify that your editor is respecting the correct .editorconfig file and what configuration is being applied.

From [this thread][editorconfig-vim-issue-129]:

This will show the settings for a file with the .txt extension, but it probably should be the filetype you are debugging.

$ vi
:let g:EditorConfig_verbose=1
:e anything.txt
Applying EditorConfig vim_core on file "/home/guyhoozdis/something.sh"
Options: {'max_line_length': '79', 'insert_final_newline': 'true', 'end_of_line': 'lf', 'charset': 'utf-8', 'indent_style': 'space', 'i
@GuyHoozdis
GuyHoozdis / sysexits.h
Created July 17, 2024 17:55
StdLib Reference for Bash Script Exit Codes
/* ================================================================================================
* I got this file from OpenBSD, but it is the same on all *nix systems.
* src/include/sysexits.h
* https://github.com/openbsd/src/blob/6bbe7482548abcf93e2bfaec247b89a8d8022695/include/sysexits.h
*
* For conformity, I like to use these exit codes in my bash scripts.
* ================================================================================================ */
/* $OpenBSD: sysexits.h,v 1.5 2003/06/02 19:34:12 millert Exp $ */
/* $NetBSD: sysexits.h,v 1.4 1994/10/26 00:56:33 cgd Exp $ */
@GuyHoozdis
GuyHoozdis / bash-template
Last active May 24, 2018 06:57 — forked from renzok/bash-template
A template bash script based on google style guide with some little improvements
#!/bin/bash
# Here short description of this script
# This is just a template to be used for writing new bash scripts
###
# Above all else, for the script utilities and applications you create aspire to:
# * Write small utilities with a singular focus, a limited scope, just one job. Do that job well.
# * Write utilities that are flexibile on how input is provided (e.g. pipes, redirection, ...)
# * Build application by composing these utilities or functions.
@GuyHoozdis
GuyHoozdis / minimal_patch_alternative.py
Created August 26, 2017 14:58
If you can't or don't want to use the start/stop pattern of mock.patch, this might work for you too
import mock
from couchbase.bucket import Bucket
from couchbase.n1ql import N1QLQuery
class DoInterestingStuff(object):
def __init__(self, bucket, other_thing):
self._bucket = bucket
self._other_thing = other_thing