This file contains hidden or 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
Root = React.createClass | |
search: -> | |
query = document.getElementById('searchbar').value | |
# Do search with query | |
r = Root({ … }) | |
React.renderComponent(r, document.getElementById('content')) | |
$('body').on('change', '#searchbar', r.search) |
This file contains hidden or 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
<!doctype html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<% if Rails.env.production? %> | |
<script> | |
//Hotjar tracking |
This file contains hidden or 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
{ | |
"auto_complete_commit_on_tab": true, // Return always creates a new line. Tab does autocomplete. | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
"enable_tab_scrolling": false, | |
"folder_exclude_patterns": | |
[ | |
], | |
"font_face": "Monaco", | |
"font_options": | |
[ |
This file contains hidden or 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
[ | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, // Make Ctrl+tab work the way you expect it to | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["super+shift+g"], "command": "goto_definition" }, | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, // Make Paste-and-indent the default | |
{ "keys": ["super+shift+v"], "command": "paste" }, | |
{ "keys": ["ctrl+x","o"], "command": "focus_neighboring_group" } // Copied from emacs | |
] |
This file contains hidden or 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
apt-get install git | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_rc | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_rc | |
exec bash | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
apt-get install libssl-dev | |
apt-get install zlibc zlib1g zlib1g-dev | |
apt-get install bundler |
This file contains hidden or 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 | |
# Usage: dim <number 0 – 100> | |
# http://chopmo.dk/2017/01/12/control-monitor-brightness-from-osx.html | |
cd ~/Developer | |
git clone https://github.com/kfix/ddcctl.git && cd ddcctl | |
make install | |
echo -e "#!/bin/bash\nddcctl -d 1 -b $1 && ddcctl -d 2 -b $1" > /usr/local/bin/dim | |
chmod +x /usr/local/bin/dim |
This file contains hidden or 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
# http://haacked.com/archive/2014/07/28/github-flow-aliases/ | |
# https://gist.github.com/mwhite/6887990 | |
# https://stackoverflow.com/a/5188364/472768 | |
[alias] | |
branches = branch --sort=-committerdate | |
count = count-objects -vH | |
co = checkout | |
col = checkout @{-1} | |
com = checkout master | |
newbr = checkout -b |
This file contains hidden or 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
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Fira Code with 1.1 vertical spacing. | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM='xterm-256color'; | |
fi; |
This file contains hidden or 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
{ | |
"breadcrumbs.enabled": true, | |
"editor.acceptSuggestionOnEnter": "off", | |
"editor.fontLigatures": true, | |
"editor.formatOnSave": true, | |
"editor.tabSize": 2, | |
"eslint.packageManager": "yarn", | |
"files.defaultLanguage": "markdown", | |
"files.exclude": { | |
"**/.git": true, |
This file contains hidden or 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
export EDITOR=nano | |
export SHELL=/bin/zsh | |
# https://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/ | |
export HISTTIMEFORMAT="%d/%m/%y %T " | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
for file in ~/.{path,rbenvrc,bash_prompt,exports,aliases,functions,extra,stripe_profile}; do | |
[ -r "$file" ] && [ -f "$file" ] && source "$file"; |