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/sh | |
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner | |
$cli set option.emacsmode_controlD 1 | |
/bin/echo -n . | |
$cli set option.emacsmode_controlV 1 | |
/bin/echo -n . | |
$cli set option.emacsmode_optionV 1 | |
/bin/echo -n . |
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
on alfred_script(q) | |
tell application "Google Chrome" | |
set theURL to "javascript:" | |
set URL of active tab of window 1 to theURL | |
end tell | |
end alfred_script |
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
#!/usr/bin/env bash | |
git filter-branch -f --commit-filter ' | |
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]; | |
then | |
GIT_COMMITTER_NAME="YOUR NAME"; | |
GIT_AUTHOR_NAME="YOUR NAME"; | |
GIT_COMMITTER_EMAIL="[email protected]"; | |
GIT_AUTHOR_EMAIL="[email protected]"; | |
git commit-tree "$@"; |
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
#! /usr/bin/osascript | |
on run arguments | |
if (count of arguments) > 0 then | |
tell application "OmniFocus" | |
tell default document | |
set result to make new inbox task with properties {name:arguments} | |
end tell | |
end tell | |
display notification "[+] " & arguments |
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
#!/usr/bin/env bash | |
case $1 in | |
start) | |
open -a dropbox; | |
;; | |
stop) | |
osascript -e 'tell application "dropbox" to quit' | |
;; | |
restart) |
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
# Configuration file for dnsmasq. | |
# | |
# Format is one option per line, legal options are the same | |
# as the long options legal on the command line. See | |
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. | |
# Listen on this specific port instead of the standard DNS port | |
# (53). Setting this to zero completely disables DNS function, | |
# leaving only DHCP and/or TFTP. | |
#port=5353 |
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
PREFIX="/usr/local" | |
RBENV_PREFIX="$PREFIX/rbenv" | |
BIN_PATH="$PREFIX/bin" | |
RBENV_GROUP="rbenv" | |
umask 002 | |
## Install rbenv, ruby-build and rbenv-gem-rehash | |
git clone git://github.com/sstephenson/rbenv.git $RBENV_PREFIX |
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
# This is example contains the bare mininum to get nginx going with | |
# Unicorn or Rainbows! servers. Generally these configuration settings | |
# are applicable to other HTTP application servers (and not just Ruby | |
# ones), so if you have one working well for proxying another app | |
# server, feel free to continue using it. | |
# | |
# The only setting we feel strongly about is the fail_timeout=0 | |
# directive in the "upstream" block. max_fails=0 also has the same | |
# effect as fail_timeout=0 for current versions of nginx and may be | |
# used in its place. |
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
FROM ubuntu:14.04 | |
MAINTAINER Yaodong Zhao | |
RUN apt-get install -y build-essential libssl-dev git nginx postgresql postgresql-contrib | |
RUN git clone https://github.com/sstephenson/rbenv.git .rbenv | |
RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
ENV PATH ~/.rbenv/bin:~/.rbenv/bin:$PATH |
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
source "https://api.berkshelf.com" | |
cookbook 'build-essential', '~> 2.0.6' | |
cookbook 'sudo', '~> 2.7.0' | |
cookbook 'users', '~> 1.7.0' | |
cookbook 'chef-solo-search', '~> 0.5.1' | |
cookbook 'sshd', '~> 1.1.0' | |
cookbook 'fail2ban', '~> 2.2.0' | |
cookbook 'ufw', '~> 0.7.4' |