Skip to content

Instantly share code, notes, and snippets.

View tylerfowle's full-sized avatar

Tyler Fowle tylerfowle

View GitHub Profile
@tylerfowle
tylerfowle / hide_macos_dock_icon.sh
Created October 8, 2018 12:51
Hide active apps from macos dock
# Used this to hide “xScope.app” or "iTerm.app" from the Dock
# Quit and re-start your app after applying for the setting to take effect.
# Hide Application from Dock:
defaults write /Applications/Application.app/Contents/Info LSUIElement 1
@tylerfowle
tylerfowle / threading.py
Created August 31, 2018 19:33
python threading
import time
from threading import Thread
def myfunc(i):
print("sleeping 5 sec from thread %d" % i)
time.sleep(5)
print("finished sleeping from thread %d" % i)
for i in range(10):
t = Thread(target=myfunc, args=(i,))
@tylerfowle
tylerfowle / multi-directory-git-commands.md
Created August 7, 2018 20:59
run a git command in multiple directories

ls | xargs -I{} git -C {} pull

To do it in parallel:

ls | xargs -P10 -I{} git -C {} pull

@tylerfowle
tylerfowle / gruvbox.js
Created April 20, 2018 04:16
gruvbox theme for blinksh
black = '#282828';
red = '#cc241d'; // red
green = '#98971a'; // green
yellow = '#d79921'; // yellow
blue = '#458588'; // blue
magenta = '#b16286'; // pink
cyan = '#689d6a'; // cyan
white = '#a89984'; // light gray
lightBlack = '#928374'; // medium gray
lightRed = '#fb4934'; // red
@tylerfowle
tylerfowle / karabiner_elements_examples.md
Created April 18, 2018 15:13
Examples of complex Karabiner Elements configs

Virtual Modifiers

Use variable_if to accomplish the virtual modifiers. The following example uses tab_modifier variable as flag.

{
    "manipulators": [
        {
            "from": {
                "key_code": "tab"
            },
@tylerfowle
tylerfowle / fix-sierra-ssh.md
Created May 31, 2017 16:04
Fix sierra forgetting ssh passphrase

add this to your ~/.ssh/config

Host *
    UseKeychain yes
@tylerfowle
tylerfowle / merge.md
Created December 6, 2016 20:29 — forked from jt/merge.md
Merge a forked gist

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git://gist.github.com/1163142.git gist-1163142
    
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://gist.github.com/1164196.git