This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+f"], "command": "reindent", "args": {"single_line": false} }, | |
{ "keys": ["ctrl+shift+space"], "command": "afn_show_filenames", | |
"context": | |
[ | |
{ "key": "afn_use_keybinding", "operator": "equal", "operand": true } | |
] | |
}, | |
{ "keys": ["ctrl+shift+j"], "command": "json_reindent"}, | |
{ "keys": ["ctrl+alt+shift+j"], "command": "jsbeautify"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="josh" | |
# Uncomment the following line to use case-sensitive completion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_pwd() { | |
echo "${PWD/$HOME/~}" | |
} | |
function git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} | |
function put_spacing() { | |
local git=$(git_prompt_info) | |
if [ ${#git} != 0 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deepCompare () { | |
var i, l, leftChain, rightChain; | |
function compare2Objects (x, y) { | |
var p; | |
// remember that NaN === NaN returns false | |
// and isNaN(undefined) returns true | |
if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') { | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Was asked how I keep my zshrc config sync'd between my computers with Google Drive | |
# Add a new directory in your Google Drive (or use an existing one) | |
mkdir -p ~/Google\ Drive/Mac | |
ln -s ~/Google\ Drive/Mac/.zshrc ~/.zshrc | |
# move existing file to Google Drive | |
mv ~/.zshrc ~/Google\ Drive/Mac | |
# symlink file back to your local directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Don't want to interpret variables whilst reading from the HEREDOC - thus the single quotes... potto | |
cat << 'EOF' >> /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js | |
document.addEventListener('DOMContentLoaded', function() { | |
$.ajax({ | |
url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css', | |
success: function(css) { | |
$("<style></style>").appendTo('head').html(css); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local ngnix server for mac to have subroutes to your localhost domain | |
# With this, if you hit http://localhost/food, it'll load localhost:8580 on that route. | |
# /usr/local/etc/nginx/nginx.conf | |
http { | |
server { | |
listen 80; | |
server_name localhost; | |
location /food/ { |