Skip to content

Instantly share code, notes, and snippets.

Steve Ross steve-ross

Block or report user

Report or block steve-ross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@steve-ross
steve-ross / .direnvrc
Last active Nov 14, 2017
Some Useful direnv.net helpers
View .direnvrc
install_nvm(){
log_status "Installing NVM"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
nvm install
}
npm_install(){
local HAS_NODE_MODULES_BIN=$(find node_modules/.bin)
if [ -z "$HAS_NODE_MODULES_BIN" ]; then
@steve-ross
steve-ross / hideFiles.fish
Created Aug 3, 2016
fish function hide hidden files fish function
View hideFiles.fish
function hideFiles
defaults write com.apple.finder AppleShowAllFiles NO
killall Finder /System/Library/CoreServices/Finder.app $argv
end
@steve-ross
steve-ross / showFiles.fish
Created Aug 3, 2016
Mac finder showhidden files fish function
View showFiles.fish
function showFiles
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder /System/Library/CoreServices/Finder.app $argv
end
@steve-ross
steve-ross / hub-browse-issue.fish
Last active Mar 9, 2017
Fish plugin to open the issue number for your git branch on github (if your branch is named) my-feature-branch#123 where #123 is your ticket number
View hub-browse-issue.fish
function _git_branch_issue_number
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's/.*#//')
end
function hub-browse-issue
set -l issue_number (_git_branch_issue_number)
hub browse -- issues/$issue_number
end
@steve-ross
steve-ross / n98-magerun.phar.fish
Last active May 17, 2016
n98-magerun completions for fish
View n98-magerun.phar.fish
# Installation:
# This assumes that "n98-magerun.phar" is in your path!
# Copy to ~/.config/fish/completions/n98-magerun.phar.fish
# open new or restart existing shell session
for cmd in (n98-magerun.phar --raw --no-ansi list | sed "s/[[:space:]].*//g");
complete -f -c n98-magerun.phar -a $cmd;
end
View gist:4354137

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
View Python CouchDB External example
import sys, json
class External(object):
def run(self):
line = sys.stdin.readline()
while line:
try:
response = self.process(json.loads(line.decode('utf_8')))
except Exception, e:
response = {'code':500, 'json':{'error':True, 'reason':"Internal error processing request (%s)" % e}}
You can’t perform that action at this time.