├── etc ├── usr ├── local └── .keep ├── home ├── .gnupg │ └── .keep ├── .mutt │ ├── var │ │ └── .keep │ ├── colors │ └── accounts │ │ ├── gmail@example.com.sh │ │ └── exchange@example.com.sh ├── .config │ ├── nvim │ ├── htop │ │ └── htoprc │ ├── base16-shell │ ├── Code │ │ ├── User │ │ │ └── settings.json │ │ └── README.md │ ├── sublime-text-3 │ │ ├── Packages │ │ │ └── User │ │ │ │ ├── Markdown Extended.sublime-settings │ │ │ │ ├── Preferences.sublime-settings │ │ │ │ └── Package Control.sublime-settings │ │ └── Readme.md │ └── git │ │ ├── attributes │ │ └── ignore ├── .rvm │ ├── gemsets │ │ ├── default.gems │ │ └── global.gems │ └── user │ │ └── db ├── .fzf ├── .gvm ├── .nvm ├── .vim ├── .antigen ├── .emacs.d ├── .linuxbrew ├── .prezto ├── .pyenv │ ├── bin │ └── plugins │ │ ├── pyenv-doctor │ │ ├── pyenv-update │ │ ├── pyenv-installer │ │ ├── pyenv-which-ext │ │ ├── pyenv-virtualenv │ │ └── python-build ├── .oh-my-zsh ├── .rbenv │ ├── bin │ ├── plugins │ │ ├── rbenv-use │ │ ├── rbenv-update │ │ ├── rbenv-whatis │ │ ├── rbenv-vars │ │ ├── ruby-build │ │ ├── rbenv-gem-rehash │ │ └── rbenv-default-gems │ └── default-gems ├── .scm_breeze ├── .zshrc.d │ ├── zaw.zsh │ ├── notes.autocomplete.zsh │ ├── per-directory-history.zsh │ ├── zsh_syntax_highlighting.zsh │ ├── nocorrect.zsh │ ├── opam.zsh │ ├── anitgen.zsh │ ├── __.sh │ ├── iterm2.zsh │ ├── awscli.zsh │ └── example.autocomplete.zsh ├── .bashrc.d │ ├── notes.autocomplete.bash │ ├── mkdir.bash │ ├── cd.bash │ ├── overcast.bash │ ├── __.sh │ ├── history.bash │ ├── mategem.bash │ ├── git.bash │ ├── z.sh │ ├── awscli.bash │ ├── iterm2.bash │ └── ls.bash ├── .manuel.d │ └── plugins │ │ ├── manuel-contrib-watch │ │ └── manuel-contrib-concurrent ├── .oh-my-zsh.custom │ ├── themes │ │ └── astral.zsh-theme │ ├── example.zsh │ └── plugins │ │ ├── example │ │ └── example.plugin.zsh │ │ └── change-extension │ │ └── change-extension.plugin.zsh ├── .lein │ └── profiles.clj ├── .luarocks │ └── config.lua ├── .ocamlinit ├── .hammerspoon │ └── init.lua ├── .overcast │ ├── example.variables.json │ └── example.clusters.json ├── .psqlrc.local.example ├── .shared_rc.d │ ├── hr.sh │ ├── overcast.sh │ ├── bask.sh │ ├── hosts.sh │ ├── notes.sh │ ├── symlink.sh │ ├── htop.sh │ ├── tig.sh │ ├── multirust.sh │ ├── friends.sh │ ├── rm.sh │ ├── search.sh │ ├── fzf.sh │ ├── newsbeuter.sh │ ├── __.sh │ ├── cmus.sh │ ├── fasd.sh │ ├── nix.sh │ ├── clear.sh │ ├── ruby.sh │ ├── cd.sh │ ├── hd_hexdump.sh │ ├── base16-shell.sh │ └── macos.sh ├── .shared_env.d │ ├── haskell.sh │ ├── hyperlocal.sh │ ├── grep.sh │ ├── java.sh │ ├── scala.sh │ ├── bpkg.sh │ ├── macos_build_variables.sh │ ├── editor.sh │ ├── locale.sh │ ├── __.sh │ ├── session_type.sh │ ├── rvm.sh │ ├── paths.sh │ ├── linuxbrew.sh │ ├── opam.sh │ ├── shellcheck.sh │ ├── vim.sh │ ├── autoenv.sh │ ├── vvv-varying-vagrant-vagrants.sh │ ├── vagrant.sh │ ├── rbenv.sh │ ├── homebrew.sh │ └── docker.sh ├── .zshrc.local.example ├── .zshenv.local.example ├── .bpkg │ └── Readme.md ├── .gemrc ├── .textadept │ └── init.lua ├── .bashenv.local.example ├── .bashrc.local.example ├── .mjolnir │ └── init.lua ├── .shared_rc.local.example ├── .shared_env.local.example ├── .bindlerc ├── .curlrc ├── .hgrc.local.example ├── .zprofile.d │ ├── macos_path_fix.zsh │ └── __.sh ├── .hgignore_global ├── .sbclrc ├── .amethyst ├── .iterm2 │ └── it2dl ├── .ghci ├── .rspec ├── .gitconfig.local.example ├── .aws │ └── Readme.md ├── .scmbrc ├── .zshenv.d │ └── __.sh ├── .profile.d │ └── __.sh ├── .surfraw.conf ├── .cabal │ ├── where-is-my-stuff.txt │ ├── README.md │ └── generate_config.sh ├── .newsbeuter │ └── urls ├── .atom │ ├── snippets.cson │ └── init.coffee ├── .hyperlocal │ └── Readme.md ├── .htoprc ├── .fzf.bash ├── .fzf.zsh ├── .ssh │ └── config.d │ │ └── example.com.sshconfig ├── .mailcap ├── .gntrc ├── .hgrc ├── .orphans │ ├── hr.bash │ ├── meteor.bash │ ├── black_screen.bash │ ├── rosetta.bash │ ├── neovim_dot_app.bash │ ├── bish.bash │ ├── multirust.bash │ ├── iota.bash │ ├── xsv.bash │ ├── ammonite.bash │ ├── alcatraz.bash │ ├── zindex.bash │ └── exa.bash ├── .ackrc ├── .notesrc ├── .tigrc ├── .bash_profile ├── .shared_rc ├── .gitignore_global ├── .ammonite │ └── predef.scala ├── .bashenv ├── .profile ├── .zprofile ├── .taskrc ├── .wgetrc ├── .sackrc ├── .inputrc ├── .psqlrc ├── .zshenv └── .irbrc ├── Vagrantfile ├── bin ├── t2 ├── pb ├── desk ├── with ├── bask ├── bork ├── dsgn ├── notes ├── nsplit ├── osx ├── pwd.sh ├── vbox ├── airport ├── bindle ├── emojify ├── mac ├── manuel ├── noclobber ├── orphans ├── sempl ├── shrepl ├── termpdf ├── accounts ├── git-nest ├── pipes.sh ├── search ├── spotify ├── bork-compile ├── git-mkrepo ├── shell-app ├── markdown ├── spaceman-diff ├── tat ├── vimr ├── mategem ├── gobang.go ├── brackets ├── disk-inventory-x ├── repl ├── manp ├── dupecheck ├── now ├── snow ├── colors.bash ├── define ├── ccal ├── git-find-large-objects ├── manh ├── dg ├── explain ├── i ├── unicode ├── hosts ├── colors.sh └── extract ├── config └── color-schemes │ └── base16-builder ├── vendor └── local │ └── customizations │ └── icons │ ├── MacVim.icns │ ├── iTerm2.icns │ └── Readme.markdown ├── script ├── README.md ├── install │ ├── orphans │ ├── cargo-packages │ ├── apt-packages.d │ │ └── apt-ruby-build-packages │ ├── clib-packages │ ├── heroku-plugins │ ├── luarocks │ ├── brew-all │ ├── apt-packages │ └── bpkg-packages ├── bootstrap │ └── osx ├── configure │ └── macos_apps └── customize │ ├── vscode │ ├── sublime-text-3 │ └── macos_calendar_sounds ├── Baskfile ├── boxes └── scripts │ └── provision.bash └── LICENSE /etc: -------------------------------------------------------------------------------- 1 | /etc -------------------------------------------------------------------------------- /usr: -------------------------------------------------------------------------------- 1 | /usr -------------------------------------------------------------------------------- /local/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /home/.gnupg/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /home/.mutt/var/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /home/.config/nvim: -------------------------------------------------------------------------------- 1 | ../.vim -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | boxes/base/Vagrantfile -------------------------------------------------------------------------------- /home/.rvm/gemsets/default.gems: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/t2: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/nuex/t/t -------------------------------------------------------------------------------- /home/.config/htop/htoprc: -------------------------------------------------------------------------------- 1 | ../../.htoprc -------------------------------------------------------------------------------- /bin/pb: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/pb/pb -------------------------------------------------------------------------------- /home/.fzf: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/junegunn/fzf -------------------------------------------------------------------------------- /home/.gvm: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/moovweb/gvm -------------------------------------------------------------------------------- /bin/desk: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/jamesob/desk/desk -------------------------------------------------------------------------------- /bin/with: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/mchav/with/with -------------------------------------------------------------------------------- /home/.nvm: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/creationix/nvm -------------------------------------------------------------------------------- /home/.vim: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/dotvim -------------------------------------------------------------------------------- /bin/bask: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/bask/bask -------------------------------------------------------------------------------- /bin/bork: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/mattly/bork/bin/bork -------------------------------------------------------------------------------- /bin/dsgn: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/dsgn/dsgn -------------------------------------------------------------------------------- /bin/notes: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/notes/notes -------------------------------------------------------------------------------- /bin/nsplit: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/e36freak/tools/nsplit -------------------------------------------------------------------------------- /bin/osx: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/osx-cli/osx -------------------------------------------------------------------------------- /bin/pwd.sh: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/drduh/pwd.sh/pwd.sh -------------------------------------------------------------------------------- /bin/vbox: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/vbox/vbox -------------------------------------------------------------------------------- /home/.antigen: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/zsh-users/antigen -------------------------------------------------------------------------------- /home/.emacs.d: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/syl20bnr/spacemacs -------------------------------------------------------------------------------- /home/.linuxbrew: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/Linuxbrew/brew -------------------------------------------------------------------------------- /home/.prezto: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/sorin-ionescu/prezto -------------------------------------------------------------------------------- /home/.pyenv/bin: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/yyuu/pyenv/bin -------------------------------------------------------------------------------- /bin/airport: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/airport/airport -------------------------------------------------------------------------------- /bin/bindle: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/bindle/bindle -------------------------------------------------------------------------------- /bin/emojify: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/mrowa44/emojify/emojify -------------------------------------------------------------------------------- /bin/mac: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/guarinogabriel/mac-cli/mac -------------------------------------------------------------------------------- /bin/manuel: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/manuel/manuel -------------------------------------------------------------------------------- /bin/noclobber: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/e36freak/tools/noclobber -------------------------------------------------------------------------------- /bin/orphans: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/orphans/orphans -------------------------------------------------------------------------------- /bin/sempl: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/nextrevision/sempl/sempl -------------------------------------------------------------------------------- /bin/shrepl: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/joh6nn/shrepl/bin/shrepl -------------------------------------------------------------------------------- /bin/termpdf: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/dsanson/termpdf/termpdf -------------------------------------------------------------------------------- /home/.oh-my-zsh: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/robbyrussell/oh-my-zsh -------------------------------------------------------------------------------- /bin/accounts: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/accounts/accounts -------------------------------------------------------------------------------- /bin/git-nest: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/git-nest/git-nest -------------------------------------------------------------------------------- /bin/pipes.sh: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/livibetter/pipes.sh/pipes.sh -------------------------------------------------------------------------------- /bin/search: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/search.sh/search.sh -------------------------------------------------------------------------------- /bin/spotify: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/hnarayanan/shpotify/spotify -------------------------------------------------------------------------------- /home/.rbenv/bin: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/sstephenson/rbenv/bin -------------------------------------------------------------------------------- /home/.scm_breeze: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/ndbroadbent/scm_breeze -------------------------------------------------------------------------------- /bin/bork-compile: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/mattly/bork/bin/bork-compile -------------------------------------------------------------------------------- /bin/git-mkrepo: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/git-mkrepo/git-mkrepo -------------------------------------------------------------------------------- /bin/shell-app: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/alphabetum/shell-app/shell-app -------------------------------------------------------------------------------- /home/.zshrc.d/zaw.zsh: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/zsh-users/zaw/zaw.zsh -------------------------------------------------------------------------------- /bin/markdown: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/chadbraunduin/markdown.bash/markdown.sh -------------------------------------------------------------------------------- /bin/spaceman-diff: -------------------------------------------------------------------------------- 1 | ../vendor/com/github/holman/spaceman-diff/spaceman-diff -------------------------------------------------------------------------------- /home/.rbenv/plugins/rbenv-use: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/rkh/rbenv-use -------------------------------------------------------------------------------- /home/.config/base16-shell: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/chriskempson/base16-shell -------------------------------------------------------------------------------- /home/.pyenv/plugins/pyenv-doctor: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/yyuu/pyenv-doctor -------------------------------------------------------------------------------- /home/.pyenv/plugins/pyenv-update: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/yyuu/pyenv-update -------------------------------------------------------------------------------- /home/.rbenv/plugins/rbenv-update: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/rkh/rbenv-update -------------------------------------------------------------------------------- /home/.rbenv/plugins/rbenv-whatis: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/rkh/rbenv-whatis -------------------------------------------------------------------------------- /home/.pyenv/plugins/pyenv-installer: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/yyuu/pyenv-installer -------------------------------------------------------------------------------- /home/.pyenv/plugins/pyenv-which-ext: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/yyuu/pyenv-which-ext -------------------------------------------------------------------------------- /home/.rbenv/plugins/rbenv-vars: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/sstephenson/rbenv-vars -------------------------------------------------------------------------------- /home/.rbenv/plugins/ruby-build: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/sstephenson/ruby-build -------------------------------------------------------------------------------- /config/color-schemes/base16-builder: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/chriskempson/base16-builder -------------------------------------------------------------------------------- /home/.pyenv/plugins/pyenv-virtualenv: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/yyuu/pyenv-virtualenv -------------------------------------------------------------------------------- /home/.pyenv/plugins/python-build: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/yyuu/pyenv/plugins/python-build -------------------------------------------------------------------------------- /home/.rbenv/plugins/rbenv-gem-rehash: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/sstephenson/rbenv-gem-rehash -------------------------------------------------------------------------------- /home/.rvm/user/db: -------------------------------------------------------------------------------- 1 | # User settings, overrides db settings and persists across installs. 2 | -------------------------------------------------------------------------------- /home/.rbenv/plugins/rbenv-default-gems: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/sstephenson/rbenv-default-gems -------------------------------------------------------------------------------- /home/.rvm/gemsets/global.gems: -------------------------------------------------------------------------------- 1 | gem-wrappers 2 | rubygems-bundler 3 | bundler 4 | rake 5 | rvm 6 | -------------------------------------------------------------------------------- /home/.bashrc.d/notes.autocomplete.bash: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/alphabetum/notes/notes.autocomplete.bash -------------------------------------------------------------------------------- /home/.manuel.d/plugins/manuel-contrib-watch: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/alphabetum/manuel-contrib-watch -------------------------------------------------------------------------------- /home/.zshrc.d/notes.autocomplete.zsh: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/alphabetum/notes/notes.autocomplete.zsh -------------------------------------------------------------------------------- /home/.oh-my-zsh.custom/themes/astral.zsh-theme: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/alphabetum/astral/astral.zsh-theme -------------------------------------------------------------------------------- /home/.manuel.d/plugins/manuel-contrib-concurrent: -------------------------------------------------------------------------------- 1 | ../../../vendor/com/github/alphabetum/manuel-contrib-concurrent -------------------------------------------------------------------------------- /home/.mutt/colors: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/altercation/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc -------------------------------------------------------------------------------- /home/.zshrc.d/per-directory-history.zsh: -------------------------------------------------------------------------------- 1 | ../../vendor/com/github/jimhester/per-directory-history/per-directory-history.zsh -------------------------------------------------------------------------------- /home/.lein/profiles.clj: -------------------------------------------------------------------------------- 1 | {:user {:plugins [[venantius/ultra "0.1.9"]] 2 | :ultra {:color-scheme :solarized_dark}}} 3 | -------------------------------------------------------------------------------- /vendor/local/customizations/icons/MacVim.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwmx/dotfiles/HEAD/vendor/local/customizations/icons/MacVim.icns -------------------------------------------------------------------------------- /vendor/local/customizations/icons/iTerm2.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xwmx/dotfiles/HEAD/vendor/local/customizations/icons/iTerm2.icns -------------------------------------------------------------------------------- /home/.luarocks/config.lua: -------------------------------------------------------------------------------- 1 | -- Configuration for LuaRocks 2 | -- 3 | -- http://luarocks.org/ 4 | 5 | rocks_servers = { "http://rocks.moonscript.org" } 6 | -------------------------------------------------------------------------------- /home/.ocamlinit: -------------------------------------------------------------------------------- 1 | (* Added by OPAM. *) 2 | let () = 3 | try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") 4 | with Not_found -> () 5 | ;; 6 | 7 | -------------------------------------------------------------------------------- /bin/tat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Attach or create tmux session named the same as current directory. 4 | 5 | tmux new-session -As "$(basename "$PWD" | tr . -)" 6 | 7 | -------------------------------------------------------------------------------- /bin/vimr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Simple command line script for VimR 4 | # 5 | # http://vimr.org/ 6 | # https://github.com/qvacua/vimr 7 | 8 | open -a "VimR" "$*" 9 | -------------------------------------------------------------------------------- /home/.oh-my-zsh.custom/example.zsh: -------------------------------------------------------------------------------- 1 | # Add yourself some shortcuts to projects you often work on 2 | # Example: 3 | # 4 | # brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr 5 | # 6 | -------------------------------------------------------------------------------- /home/.hammerspoon/init.lua: -------------------------------------------------------------------------------- 1 | -- Configuration for Hammerspoon 2 | -- 3 | -- A tool for powerful automation of OS X. 4 | -- 5 | -- http://www.hammerspoon.org/ 6 | -- https://github.com/Hammerspoon/hammerspoon 7 | 8 | -------------------------------------------------------------------------------- /bin/mategem: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage() 4 | { 5 | echo "Usage: $(basename $0) " 1>&2 6 | exit 1 7 | } 8 | 9 | GEM="$1" 10 | 11 | [ -z "$GEM" ] && usage 12 | mate "$(gem environment gemdir)/gems/$GEM" -------------------------------------------------------------------------------- /home/.oh-my-zsh.custom/plugins/example/example.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Add your own custom plugins in the custom/plugins directory. Plugins placed 2 | # here will override ones with the same name in the main plugins directory. 3 | -------------------------------------------------------------------------------- /home/.overcast/example.variables.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWS_KEY": "", 3 | "AWS_SECRET": "", 4 | "DIGITALOCEAN_CLIENT_ID": "", 5 | "DIGITALOCEAN_API_KEY": "", 6 | "LINODE_API_KEY": "", 7 | "SLACK_WEBHOOK_URL": "" 8 | } 9 | -------------------------------------------------------------------------------- /home/.psqlrc.local.example: -------------------------------------------------------------------------------- 1 | -- .psqlrc.local 2 | -- 3 | -- Local, untracked .psqlrc settings. 4 | -- 5 | -- Copy this file to the $HOME directory, but without the '.example' extension, 6 | -- and uncomment the `\i ~/.psqlrc.local` line in .psqlrc. 7 | -------------------------------------------------------------------------------- /home/.shared_rc.d/hr.sh: -------------------------------------------------------------------------------- 1 | 2 | # hr() 3 | # 4 | # Usage: 5 | # hr 6 | # 7 | # Description: 8 | # Print a horizontal line with a length matching the width of the terminal. 9 | hr() { 10 | printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - 11 | } 12 | -------------------------------------------------------------------------------- /home/.oh-my-zsh.custom/plugins/change-extension/change-extension.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Change file extensions recursively in current directory 2 | # 3 | # change-extension erb haml 4 | 5 | change-extension() { 6 | foreach f (**/*.$1) 7 | mv $f $f:r.$2 8 | end 9 | } 10 | 11 | -------------------------------------------------------------------------------- /home/.bashrc.d/mkdir.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # mkdir 3 | ############################################################################### 4 | 5 | # Create intermediate directories as required 6 | alias mkdir='mkdir -p' 7 | 8 | -------------------------------------------------------------------------------- /script/README.md: -------------------------------------------------------------------------------- 1 | # script 2 | 3 | Scripts for managing the installation of packages and modules, as well 4 | as configuration and customization of the OS and applications. 5 | 6 | All of these are intended to be run using 7 | [`bindle`](https://github.com/alphabetum/bindle), though they can also be run 8 | directly. 9 | -------------------------------------------------------------------------------- /home/.shared_env.d/haskell.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Haskell / Cabal 3 | ############################################################################### 4 | 5 | # Add binaries in cabal install location to path. 6 | export PATH="${HOME}/Library/Haskell/bin:${PATH}" 7 | -------------------------------------------------------------------------------- /home/.shared_rc.d/overcast.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Overcast 3 | # 4 | # https://github.com/andrewchilds/overcast 5 | # http://andrewchilds.github.io/overcast/ 6 | ############################################################################### 7 | 8 | alias oc=overcast 9 | -------------------------------------------------------------------------------- /home/.zshrc.local.example: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .zshrc.local 3 | # 4 | # Local, untracked .zshrc settings. 5 | # 6 | # Copy this file to the $HOME directory, but without the '.example' extension. 7 | ############################################################################### 8 | -------------------------------------------------------------------------------- /bin/gobang.go: -------------------------------------------------------------------------------- 1 | //usr/bin/env go run "$0" "$@"; exit "$?" 2 | // 3 | // An example of a working go shebang, even though it technically isn't one. 4 | // Via: 5 | // http://stackoverflow.com/a/17900932 6 | package main 7 | 8 | import "fmt" 9 | 10 | func main() { 11 | fmt.Println("//usr/bin/env go run \"$0\" \"$@\"; exit \"$?\"") 12 | } 13 | -------------------------------------------------------------------------------- /home/.zshenv.local.example: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .zshenv.local 3 | # 4 | # Local, untracked .zshenv settings. 5 | # 6 | # Copy this file to the $HOME directory, but without the '.example' extension. 7 | ############################################################################### 8 | -------------------------------------------------------------------------------- /home/.bpkg/Readme.md: -------------------------------------------------------------------------------- 1 | # .bpkg 2 | 3 | Configuration and install location for scripts installed with bpkg 4 | 5 | - http://www.bpkg.io/ 6 | - https://github.com/bpkg/bpkg 7 | 8 | Additional configuration files: 9 | - [home/.shared_env.d/bpkg.sh](../.shared_env.d/bpkg.sh) 10 | - [script/install/bpkg-packages](../../script/install/bpkg-packages) 11 | -------------------------------------------------------------------------------- /home/.gemrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .gemrc 3 | # 4 | # Environment configuration for RubyGems. 5 | # 6 | # http://guides.rubygems.org/command-reference/#gem-environment 7 | ############################################################################### 8 | --- 9 | gem: --no-document 10 | -------------------------------------------------------------------------------- /home/.shared_rc.d/bask.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # bask - shortcuts 3 | # 4 | # A mini-framework for command-centric Bash scripts. 5 | # 6 | # https://github.com/alphabetum/bask 7 | ############################################################################### 8 | 9 | alias b='bask' 10 | -------------------------------------------------------------------------------- /home/.textadept/init.lua: -------------------------------------------------------------------------------- 1 | -- Textadept config 2 | -- 3 | -- A fast, minimalist, and extensible cross-platform text editor 4 | -- 5 | -- http://foicica.com/textadept/ 6 | -- http://foicica.com/textadept/manual.html 7 | 8 | -- Set theme to dark in GUI mode and custom_term in terminal mode. 9 | ui.set_theme(not CURSES and 'dark' or 'custom_term') 10 | -------------------------------------------------------------------------------- /home/.shared_rc.d/hosts.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # hosts 3 | # 4 | # A command line tool for managing hosts file entries. 5 | # 6 | # https://github.com/alphabetum/hosts 7 | ############################################################################### 8 | 9 | alias hosts="hosts --auto-sudo" 10 | -------------------------------------------------------------------------------- /home/.bashenv.local.example: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # .bashenv.local 4 | # 5 | # Local, untracked .bashenv settings. 6 | # 7 | # Copy this file to the $HOME directory, but without the '.example' extension. 8 | ############################################################################### 9 | -------------------------------------------------------------------------------- /home/.bashrc.local.example: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # .bashrc.local 4 | # 5 | # Local, untracked .bashrc settings. 6 | # 7 | # Copy this file to the $HOME directory, but without the '.example' extension. 8 | ############################################################################### 9 | -------------------------------------------------------------------------------- /home/.mjolnir/init.lua: -------------------------------------------------------------------------------- 1 | -- Configuration for Mjolnir 2 | -- 3 | -- Lightweight automation and productivity power-tool for OS X 4 | -- 5 | -- https://github.com/sdegutis/mjolnir 6 | 7 | local application = require "mjolnir.application" 8 | local hotkey = require "mjolnir.hotkey" 9 | local window = require "mjolnir.window" 10 | local fnutils = require "mjolnir.fnutils" 11 | -------------------------------------------------------------------------------- /home/.shared_rc.local.example: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | ############################################################################### 3 | # .shared_rc.local 4 | # 5 | # Local, untracked .shared_rc settings. 6 | # 7 | # Copy this file to the $HOME directory, but without the '.example' extension. 8 | ############################################################################### 9 | -------------------------------------------------------------------------------- /home/.shared_env.local.example: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | ############################################################################### 3 | # .shared_env.local 4 | # 5 | # Local, untracked .shared_env settings. 6 | # 7 | # Copy this file to the $HOME directory, but without the '.example' extension. 8 | ############################################################################### 9 | -------------------------------------------------------------------------------- /bin/brackets: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Simple command line script for brackets. 4 | # 5 | # As of 2014-11-25, there is no official command line tool. Existing options 6 | # include this approach and those noted here: 7 | # - https://trello.com/c/dRNqhd2L/349-s-open-file-folder-from-command-line-on-mac 8 | # - https://github.com/maxogden/bkts 9 | 10 | open -a "Brackets" "$*" 11 | -------------------------------------------------------------------------------- /home/.config/Code/User/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite the default settings 2 | { 3 | // Editor 4 | "editor.fontSize": 12, 5 | 6 | 7 | // Telemetry 8 | "telemetry.enableTelemetry": false, 9 | "telemetry.enableCrashReporter": false, 10 | 11 | // Vim 12 | "vim.useCtrlKeys": true, 13 | 14 | // Window 15 | "window.zoomLevel": -1 16 | } -------------------------------------------------------------------------------- /home/.bindlerc: -------------------------------------------------------------------------------- 1 | # .bindlerc 2 | # 3 | # Configuration file for bindle 4 | # 5 | # https://github.com/alphabetum/bindle 6 | 7 | # Set bindle directory to ~/.dotfiles only on macOS. On all other platforms, 8 | # use the default: ~/.bindle. 9 | if [[ "${OSTYPE}" =~ ^darwin ]] 10 | then 11 | export BINDLEPATH="${HOME}/.dotfiles" 12 | else 13 | export BINDLEPATH="${HOME}/.bindle" 14 | fi 15 | -------------------------------------------------------------------------------- /home/.curlrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .curlrc 3 | # 4 | # curl user config file 5 | # 6 | # http://curl.haxx.se/docs/manpage.html 7 | # http://curl.haxx.se/docs/manpage.html#-K 8 | ############################################################################### 9 | 10 | # Wait 60 seconds before timing out 11 | connect-timeout = 60 12 | -------------------------------------------------------------------------------- /home/.shared_env.d/hyperlocal.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # hyperlocal 3 | # 4 | # Configuration for the `$HOME/.hyperlocal` hierarchy. 5 | ############################################################################### 6 | 7 | PATH="${HOME}/.hyperlocal/bin:${PATH}" 8 | export PATH 9 | MANPATH="${HOME}/.hyperlocal/share/man:${MANPATH}" 10 | export MANPATH 11 | -------------------------------------------------------------------------------- /home/.shared_rc.d/notes.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # notes 3 | # 4 | # A command line note-taking and syncing tool that stores data in Markdown 5 | # files versioned with git. 6 | # 7 | # https://github.com/alphabetum/notes 8 | ############################################################################### 9 | 10 | alias note="notes" 11 | alias n="notes" 12 | -------------------------------------------------------------------------------- /home/.hgrc.local.example: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .hgrc.local 3 | # 4 | # Local, untracked .hgrc settings. 5 | # 6 | # Copy this file to the $HOME directory, but without the '.example' extension. 7 | ############################################################################### 8 | 9 | # [ui] 10 | # username=Firstname Lastname 11 | -------------------------------------------------------------------------------- /home/.config/sublime-text-3/Packages/User/Markdown Extended.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": 3 | [ 4 | "md", 5 | "markdown" 6 | ], 7 | "color_scheme": "Packages/Theme - Afterglow/Afterglow-markdown.tmTheme", 8 | "draw_centered": true, 9 | "draw_indent_guides": false, 10 | "trim_trailing_white_space_on_save": false, 11 | "word_wrap": true, 12 | "wrap_width": 80 13 | } 14 | -------------------------------------------------------------------------------- /home/.zprofile.d/macos_path_fix.zsh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # macos_path_fix.zsh 3 | # 4 | # See "$HOME/.shared_env.d/_macos_path_fix.zsh" for more information. 5 | ############################################################################## 6 | 7 | if is_macos 8 | then 9 | if is_el_capitan || is_sierra 10 | then 11 | setopt global_rcs 12 | fi 13 | fi 14 | -------------------------------------------------------------------------------- /home/.hgignore_global: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .hgignore_global 3 | # 4 | # Global ignore configuration for Mercurial / hg. 5 | # 6 | # http://www.selenic.com/mercurial/hgignore.5.html 7 | ############################################################################### 8 | 9 | # Set syntax of this file to Shell-style glob. 10 | syntax: glob 11 | 12 | *~ 13 | .DS_Store 14 | -------------------------------------------------------------------------------- /home/.bashrc.d/cd.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # cd 3 | ############################################################################### 4 | 5 | # Easier navigation: .., ..., ...., ....., ~ and - 6 | alias ..="cd .." 7 | alias ...="cd ../.." 8 | alias ....="cd ../../.." 9 | alias .....="cd ../../../.." 10 | alias ~="cd ~" # `cd` is probably faster to type though 11 | alias -- -="cd -" 12 | -------------------------------------------------------------------------------- /home/.sbclrc: -------------------------------------------------------------------------------- 1 | ;;; .sbclrc 2 | ;;; 3 | ;;; Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler. 4 | ;;; 5 | ;;; http://www.sbcl.org/ 6 | 7 | 8 | ;;; The following lines added by ql:add-to-init-file: 9 | #-quicklisp 10 | (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" 11 | (user-homedir-pathname)))) 12 | (when (probe-file quicklisp-init) 13 | (load quicklisp-init))) 14 | -------------------------------------------------------------------------------- /home/.shared_rc.d/symlink.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # symlink aliases 3 | ############################################################################### 4 | 5 | # Although these are slightly more verbose, they are more explicit and 6 | # potentially less error-prone, since they don't require the flag. 7 | symlink() { 8 | ln -s "$@" 9 | } 10 | symln() { 11 | symlink "$@" 12 | } 13 | -------------------------------------------------------------------------------- /home/.shared_env.d/grep.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Grep 3 | ############################################################################### 4 | 5 | # Use color by default 6 | if echo "hello" | grep --color=auto l >/dev/null 2>&1 7 | then 8 | export GREP_COLOR='1;32' 9 | 10 | alias grep="grep --color=auto" 11 | alias fgrep="fgrep --color=auto" 12 | alias egrep="egrep --color=auto" 13 | fi 14 | -------------------------------------------------------------------------------- /home/.zshrc.d/zsh_syntax_highlighting.zsh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # zsh-syntax-highlighting 3 | # 4 | # Fish shell like syntax highlighting for Zsh. 5 | # 6 | # https://github.com/zsh-users/zsh-syntax-highlighting 7 | ############################################################################### 8 | 9 | source "${DOTFILES}/vendor/com/github/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" 10 | -------------------------------------------------------------------------------- /home/.shared_env.d/java.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Java 3 | ############################################################################### 4 | 5 | # Set $JAVA_HOME on macOS 6 | # 7 | # More Information: 8 | # https://stackoverflow.com/q/1348842 9 | if is_macos 10 | then 11 | if [[ -z "${JAVA_HOME}" ]] 12 | then 13 | export JAVA_HOME 14 | JAVA_HOME="$(/usr/libexec/java_home)" 15 | fi 16 | fi 17 | -------------------------------------------------------------------------------- /home/.amethyst: -------------------------------------------------------------------------------- 1 | { 2 | "layouts": [ 3 | "floating", 4 | "widescreen-tall", 5 | "column", 6 | "tall", 7 | "fullscreen" 8 | ], 9 | "floating": [ 10 | "com.adiumX.adiumX", 11 | "com.agilebits.onepassword4", 12 | "com.apple.systempreferences" 13 | ], 14 | "float-small-windows": true, 15 | "mouse-follows-focus": false, 16 | "focus-follows-mouse": false, 17 | "enables-layout-hud": false, 18 | "enables-layout-hud-on-space-change": false 19 | } 20 | -------------------------------------------------------------------------------- /home/.shared_env.d/scala.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Scala 3 | # 4 | # http://scala-lang.org/ 5 | ############################################################################### 6 | 7 | # Homebrew-installed Scala 8 | # 9 | # From scala formula caveats: 10 | # To use with IntelliJ, set the Scala home to: 11 | # /usr/local/opt/scala/idea 12 | export SCALA_HOME="/usr/local/opt/scala" 13 | export PATH="${PATH}:${SCALA_HOME}/bin" 14 | -------------------------------------------------------------------------------- /home/.iterm2/it2dl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ $# -lt 1 ]; then 3 | echo "Usage: $(basename $0) file ..." 4 | exit 1 5 | fi 6 | for fn in "$@" 7 | do 8 | if [ -r "$fn" ] ; then 9 | [ -d "$fn" ] && { echo "$fn is a directory"; continue; } 10 | printf '\033]1337;File=name='`echo -n "$fn" | base64`";" 11 | wc -c "$fn" | awk '{printf "size=%d",$1}' 12 | printf ":" 13 | base64 < "$fn" 14 | printf '\a' 15 | else 16 | echo File $fn does not exist or is not readable. 17 | fi 18 | done 19 | -------------------------------------------------------------------------------- /home/.ghci: -------------------------------------------------------------------------------- 1 | -- .ghci 2 | -- 3 | -- GHCi configuration. 4 | -- 5 | -- https://www.haskell.org/haskellwiki/GHC/GHCi 6 | -- https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/ghci.html 7 | 8 | -- Set prompt to green lambda, with modules in bold green on line above. 9 | -- Example session with this prompt: 10 | -- Prelude 11 | -- λ> :module + Data.Ratio 12 | -- Prelude Data.Ratio 13 | -- λ> 2 + 2 14 | -- 4 15 | -- Prelude Data.Ratio 16 | -- λ> 17 | :set prompt "\ESC[1;32m%s\ESC[0m\n\ESC[0;32mλ> \ESC[0m" 18 | -------------------------------------------------------------------------------- /home/.config/git/attributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .config/git/attributes 3 | # 4 | # Global git attributes configuration. 5 | # 6 | # http://git-scm.com/docs/gitattributes 7 | ############################################################################### 8 | 9 | # spaceman-diff 10 | # 11 | # NOTE: additional settings in ~/.gitconfig 12 | *.png diff=spaceman-diff 13 | *.jpg diff=spaceman-diff 14 | *.jpeg diff=spaceman-diff 15 | *.gif diff=spaceman-dif 16 | -------------------------------------------------------------------------------- /home/.rspec: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .rspec 3 | # 4 | # Configuration for RSpec / rspec-core 5 | # 6 | # http://rspec.info/ 7 | # https://github.com/rspec/rspec-core 8 | # http://www.rubydoc.info/github/rspec/rspec-core#store_command_line_options__rspec 9 | ############################################################################### 10 | 11 | # Enable color in the output. 12 | --colour 13 | 14 | # Run groups and examples in random order. 15 | --order random 16 | -------------------------------------------------------------------------------- /home/.gitconfig.local.example: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .gitconfig.local 3 | # 4 | # Local, untracked .gitconfig settings. 5 | # 6 | # Copy this file to the $HOME directory, but without the '.example' extension. 7 | ############################################################################### 8 | 9 | # [user] 10 | # name = Firstname Lastname 11 | # email = firstname.lastname@example.com 12 | # [github] 13 | # user = github_username 14 | # token = auth_token 15 | -------------------------------------------------------------------------------- /home/.bashrc.d/overcast.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Overcast 3 | # 4 | # https://github.com/andrewchilds/overcast 5 | # http://andrewchilds.github.io/overcast/ 6 | ############################################################################### 7 | 8 | # Overcast Tab completion 9 | _overcast_completions() { 10 | local cur=${COMP_WORDS[COMP_CWORD]} 11 | COMPREPLY=($(compgen -W "`overcast completions`" -- "$cur")) 12 | return 0 13 | } 14 | complete -F _overcast_completions overcast 15 | -------------------------------------------------------------------------------- /vendor/local/customizations/icons/Readme.markdown: -------------------------------------------------------------------------------- 1 | Yosemite icons for iTerm2 and MacVim by https://github.com/jasonlong 2 | 3 | ### Source references 4 | 5 | #### MacVim 6 | 7 | - https://dribbble.com/shots/1697997-Vim-Yosemite-icon 8 | - https://github.com/b4winckler/macvim/pull/44 9 | - https://github.com/jasonlong/macvim/blob/024f6d4395c3e2f873e020cdddd7f3d22d05166a/src/MacVim/icons/MacVim.icns 10 | 11 | #### iTerm2 12 | 13 | - https://dribbble.com/shots/1702947-iTerm-Replacement-Icon 14 | - https://github.com/jasonlong/iterm-replacement-icon 15 | -------------------------------------------------------------------------------- /home/.shared_rc.d/htop.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # htop 3 | # 4 | # an interactive process viewer for Linux 5 | # 6 | # http://hisham.hm/htop/ 7 | # 8 | # See also: $HOME/.htoprc 9 | ############################################################################### 10 | 11 | # For htop to display correctly all running processes, it needs to run as root. 12 | if command_exists "htop" 13 | then 14 | _original_htop="$(which htop)" 15 | htop() { 16 | sudo "${_original_htop}" "$@" 17 | } 18 | fi 19 | -------------------------------------------------------------------------------- /Baskfile: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Baskfile 3 | # 4 | # Local Bask commands. 5 | # 6 | # Bask is a mini-framework for command-centric Bash scripts. 7 | # https://github.com/alphabetum/bask 8 | ############################################################################### 9 | 10 | desc "push" < /dev/null 2> /dev/null || true 15 | -------------------------------------------------------------------------------- /home/.config/git/ignore: -------------------------------------------------------------------------------- 1 | # Automatically created by GitHub for Mac 2 | # To make edits, delete these initial comments, or else your changes may be lost! 3 | 4 | .DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | 8 | # Icon must end with two \r 9 | Icon 10 | 11 | # Thumbnails 12 | ._* 13 | 14 | # Files that might appear in the root of a volume 15 | .DocumentRevisions-V100 16 | .fseventsd 17 | .Spotlight-V100 18 | .TemporaryItems 19 | .Trashes 20 | .VolumeIcon.icns 21 | 22 | # Directories potentially created on remote AFP share 23 | .AppleDB 24 | .AppleDesktop 25 | Network Trash Folder 26 | Temporary Items 27 | .apdisk 28 | -------------------------------------------------------------------------------- /home/.shared_env.d/editor.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Editor 3 | ############################################################################### 4 | 5 | if [[ -n "${SSH_CONNECTION}" ]] 6 | then 7 | export EDITOR='vim' 8 | else 9 | # export EDITOR='mvim' 10 | export EDITOR='vim' 11 | fi 12 | 13 | ############################################################################### 14 | # Vim 15 | ############################################################################### 16 | 17 | # Directory containing MacVim.app 18 | export VIM_APP_DIR="/Applications" 19 | -------------------------------------------------------------------------------- /home/.zshrc.d/anitgen.zsh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Antigen 3 | # 4 | # A plugin manager for zsh, inspired by oh-my-zsh and vundle. 5 | # 6 | # http://antigen.sharats.me/ 7 | # https://github.com/zsh-users/antigen 8 | ############################################################################### 9 | 10 | source "${HOME}/.antigen/antigen.zsh" 11 | 12 | # zsh-completions 13 | # 14 | # Additional completion definitions for Zsh. 15 | # 16 | # https://github.com/zsh-users/zsh-completions 17 | antigen bundle zsh-users/zsh-completions src 18 | 19 | antigen-apply 20 | -------------------------------------------------------------------------------- /home/.shared_env.d/locale.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Locale 3 | # 4 | # These are also mostly set in Terminal.app preferences, at: 5 | # Profiles > Advanced > Set locale environment variables on startup 6 | ############################################################################### 7 | 8 | export LANG="en_US.UTF-8" 9 | export LC_ALL="en_US.UTF-8" 10 | export LC_COLLATE="en_US.UTF-8" 11 | export LC_CTYPE="en_US.UTF-8" 12 | export LC_MESSAGES="en_US.UTF-8" 13 | export LC_MONETARY="en_US.UTF-8" 14 | export LC_NUMERIC="en_US.UTF-8" 15 | export LC_TIME="en_US.UTF-8" 16 | -------------------------------------------------------------------------------- /home/.aws/Readme.md: -------------------------------------------------------------------------------- 1 | # home/.aws 2 | 3 | Configuration for AWS tools. 4 | 5 | At minimum, this directory will usually contain two files: 6 | 7 | ## `.aws/credentials` 8 | 9 | ``` 10 | [default] 11 | aws_access_key_id = 12 | aws_secret_access_key = 13 | ``` 14 | 15 | ## `.aws/config` 16 | 17 | ``` 18 | [default] 19 | region = 20 | ``` 21 | 22 | Completion configuration: 23 | 24 | - [home/.bashrc.d/awscli.bash](../.bashrc.d/awscli.bash) 25 | - [home/.zshrc.d/awscli.zsh](../.zshrc.d/awscli.zsh) 26 | 27 | More information: 28 | 29 | https://github.com/aws/aws-cli 30 | 31 | See also: 32 | 33 | https://github.com/achiku/jungle 34 | -------------------------------------------------------------------------------- /home/.scmbrc: -------------------------------------------------------------------------------- 1 | # 2 | # Design Assets Management Config 3 | # ---------------------------------------------------------------- 4 | # Directory where design assets are stored 5 | export root_design_dir="$HOME/Dropbox/Design" 6 | # Directory where symlinks are created within each project 7 | export project_design_dir="design_assets" 8 | # Directories for per-project design assets 9 | export design_base_dirs="Documents Flowcharts Images Backgrounds Logos Icons Mockups Screenshots" 10 | export design_av_dirs="Animations Videos Flash Music Samples" 11 | # Directories for global design assets (not symlinked into projects) 12 | export design_ext_dirs="Fonts IconSets" 13 | 14 | -------------------------------------------------------------------------------- /home/.shared_rc.d/fzf.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # fzf 3 | # 4 | # fzf is a general-purpose command-line fuzzy finder. 5 | # 6 | # https://github.com/junegunn/fzf 7 | # 8 | # File locations: 9 | # - ~/.fzf 10 | # - ~/.fzf.bash 11 | # - ~/.fzf.zsh 12 | # - ~/.profile.d/fzf.sh 13 | ############################################################################### 14 | 15 | # ********************************************* 16 | # To enable fzf, uncomment the following lines: 17 | if [ -n "$ZSH_VERSION" ]; then 18 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 19 | elif [ -n "$BASH_VERSION" ]; then 20 | [ -f ~/.fzf.bash ] && source ~/.fzf.bash 21 | fi 22 | -------------------------------------------------------------------------------- /home/.shared_rc.d/newsbeuter.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Newsbeuter 3 | # 4 | # Newsbeuter is an open-source RSS/Atom feed reader for text terminals. It 5 | # runs on Linux, FreeBSD, Mac OS X and other Unix-like operating systems. 6 | # Newsbeuter’s great configurability and vast number of features make it a 7 | # perfect choice for people that need a slick and fast feed reader that can 8 | # be completely controlled via keyboard. 9 | # 10 | # http://www.newsbeuter.org/ 11 | # https://github.com/akrennmair/newsbeuter/ 12 | ############################################################################### 13 | 14 | alias feeds="newsbeuter" 15 | -------------------------------------------------------------------------------- /bin/disk-inventory-x: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # Open Disk Inventory X, with option to open as root. Opening as root makes it 4 | # possible to search the entire drive. 5 | 6 | _bin_path="/Applications/Disk Inventory X.app/Contents/MacOS/Disk Inventory X" 7 | 8 | # NOTES: 9 | # - Parens run the program in subshell, making it possible to kill the 10 | # current session without quitting the app. 11 | # - Application must be opened as root via the binary in the app bundle. `sudo` 12 | # doesn't open the application as root, neither does `open`, even after 13 | # switchin to root. 14 | if [ "$1" = "--root" ] 15 | then 16 | echo "(\"$_bin_path\" &)" | sudo su root 17 | else 18 | ("$_bin_path" &) 19 | fi 20 | -------------------------------------------------------------------------------- /home/.bashrc.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.mutt/accounts/gmail@example.com.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .mutt/accounts/gmail@example.com 3 | # 4 | # Example settings for a gmail mutt account. 5 | ############################################################################### 6 | 7 | export MUTT_PROVIDER="gmail" 8 | export MUTT_ACCOUNT_EMAIL="gmail@example.com" 9 | export MUTT_ACCOUNT_REALNAME="FirstName LastName" 10 | # Example OS X keychain password retrieval. 11 | export MUTT_ACCOUNT_PASSWORD="$( 12 | security find-generic-password \ 13 | -gs "${MUTT_ACCOUNT_EMAIL}" \ 14 | ${HOME}/Library/Keychains/login.keychain 2>&1 \ 15 | | grep password \ 16 | | cut -d '"' -f 2 17 | )" 18 | -------------------------------------------------------------------------------- /home/.zshenv.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.zshrc.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.profile.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.shared_env.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.shared_rc.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.zprofile.d/__.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # __.sh 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # Verbose Init 7 | # 8 | # Print the current file path when starting up with verbose output. This file's 9 | # presence makes it possible to confirm that files in this directory are 10 | # sourced. 11 | ############################################################################### 12 | 13 | . "$HOME/.shared_verbose_init" 14 | __verbose_init printf "Loading %s\n" \ 15 | "$([[ -n $BASH_VERSION ]] && echo "$BASH_SOURCE" || echo "$0")" 16 | -------------------------------------------------------------------------------- /home/.shared_rc.d/cmus.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # cmus 3 | # 4 | # cmus is a small, fast and powerful console music player for Unix-like 5 | # operating systems. 6 | # 7 | # https://cmus.github.io 8 | # https://news.ycombinator.com/item?id=10430512 9 | ############################################################################### 10 | 11 | # Silence error messages on El Capitan 12 | # 13 | # On El Capitan, a "...deprecated Carbon Component Manager..." error message 14 | # is displayed when a track is selected to play. More information: 15 | # https://github.com/cmus/cmus/issues/331 16 | if is_macos && is_el_capitan 17 | then 18 | alias cmus="cmus 2> /dev/null" 19 | fi 20 | -------------------------------------------------------------------------------- /home/.surfraw.conf: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Surfraw 3 | # 4 | # Surfraw provides a fast unix command line interface to a variety of popular 5 | # WWW search engines and other artifacts of power. It reclaims google, 6 | # altavista, babelfish, dejanews, freshmeat, research index, slashdot and many 7 | # others from the false-prophet, pox-infested heathen lands of html-forms, 8 | # placing these wonders where they belong, deep in unix heartland, as god 9 | # loving extensions to the shell. 10 | # 11 | # https://surfraw.alioth.debian.org/ 12 | ############################################################################### 13 | 14 | SURFRAW_text_browser=w3m 15 | SURFRAW_graphical=no 16 | -------------------------------------------------------------------------------- /home/.config/Code/README.md: -------------------------------------------------------------------------------- 1 | # Visual Studio Code 2 | 3 | This configuration for Visual Studio Code is compatible with both Linux and macOS. 4 | 5 | Only some of the files are tracked in the `bindle` git repository, but the 6 | additional files will be generated by Visual Studio Code at runtime. 7 | 8 | This location within the `.config` directory is already the default for Linux, 9 | but macOS will require this directory be symlinked from 10 | `~/Library/Application Support/Visual Studio Code`. This should be accomplished 11 | using the following command: 12 | 13 | bindle customize vscode 14 | 15 | This will run the script found in 16 | [`${BINDLE_PATH}/script/customize/vscode` 17 | ](https://github.com/alphabetum/dotfiles/blob/master/script/customize/vscode) 18 | -------------------------------------------------------------------------------- /bin/repl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # repl 4 | # 5 | # Create a repl for any command. 6 | # 7 | # More information and related tools: 8 | # https://news.ycombinator.com/item?id=12320461 9 | # https://gist.github.com/danielrw7/bb88e3dad565c0d8ee54031f6b758a09 10 | # https://github.com/mchav/With 11 | # https://github.com/defunkt/repl 12 | # https://github.com/joh6nn/shrepl 13 | ############################################################################### 14 | 15 | printf "REPL for %s\n" "$@" 16 | 17 | notblank() { 18 | [[ $# -gt 0 ]] 19 | } 20 | 21 | while true 22 | do 23 | printf "%s> " "$@" 24 | read -r || break 25 | notblank "${REPLY}" || continue 26 | eval command \"\$@\" "${REPLY}" 27 | done 28 | -------------------------------------------------------------------------------- /home/.bashrc.d/history.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # History 3 | ############################################################################### 4 | 5 | # Entries beginning with space aren't added into history, and duplicate 6 | # entries will be erased (leaving the most recent entry). 7 | export HISTCONTROL="ignoreboth" 8 | # Give history timestamps. 9 | export HISTTIMEFORMAT="[%F %T] " 10 | # Lots o' history. 11 | export HISTSIZE=10000 12 | export HISTFILESIZE=10000 13 | # Save history in dated files. 14 | # via: https://twitter.com/michaelhoffman/status/639178145673932800 15 | # NOTE: Not currently in use, but saved here for reference. 16 | # HISTFILE="${HOME}/.history/$(date -u +%Y/%m/%d.%H.%M.%S)_${HOSTNAME_SHORT}_$$" 17 | -------------------------------------------------------------------------------- /home/.config/sublime-text-3/Readme.md: -------------------------------------------------------------------------------- 1 | # Sublime Text 3 2 | 3 | This configuration for Sublime Text 3 is compatible with both Linux and macOS. 4 | 5 | Only some of the files are tracked in the `bindle` git repository, but the 6 | additional files will be generated by Sublime Text 3 at runtime. 7 | 8 | This location within the `.config` directory is already the default for Linux, 9 | but macOS will require this directory be symlinked from 10 | `~/Library/Application Support/Sublime Text 3`. This should be accomplished 11 | using the following command: 12 | 13 | bindle customize sublime-text-3 14 | 15 | This will run the script found in 16 | [`$BINDLE_PATH/script/customize/sublime-text-3` 17 | ](https://github.com/alphabetum/dotfiles/blob/master/script/customize/sublime-text-3) 18 | -------------------------------------------------------------------------------- /home/.bashrc.d/mategem.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Mategem 3 | # 4 | # See also: "$DOTFILES/bin/mategem 5 | ############################################################################### 6 | 7 | # Extend mategem to add tab-completion 8 | _mategem() 9 | { 10 | local cur prev 11 | COMPREPLY=() 12 | cur=${COMP_WORDS[COMP_CWORD]} 13 | prev=${COMP_WORDS[COMP_CWORD-1]} 14 | local gems="$(gem environment gemdir)/gems" 15 | CLICOLOR=0 16 | if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then 17 | COMPREPLY=( $( compgen -W '$(ls $gems)' $cur )) 18 | else 19 | COMPREPLY=( $( compgen -f $cur )) 20 | fi 21 | return 0 22 | } 23 | 24 | complete -F _mategem -o dirnames mategem 25 | -------------------------------------------------------------------------------- /home/.cabal/where-is-my-stuff.txt: -------------------------------------------------------------------------------- 1 | 2 | ********************************************************************** 3 | 4 | === Configuration for cabal has been written to 5 | ~/.cabal/config 6 | 7 | === Executables will be installed in: 8 | ~/Library/Haskell/bin 9 | 10 | You may wish to place this on your PATH by adding the following 11 | line to your ~/.bash_profile: 12 | 13 | export PATH="$HOME/Library/Haskell/bin:$PATH" 14 | 15 | === When documentation is built, a master index to all documentation 16 | will be placed in: 17 | 18 | ~/Library/Haskell/doc/index.html 19 | 20 | You may wish to bookmark that file once it gets built (after the 21 | first cabal install). 22 | 23 | ********************************************************************** 24 | 25 | -------------------------------------------------------------------------------- /home/.shared_env.d/session_type.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # shared_env.d/session_type.sh 3 | # 4 | # Test whether the current shell is being used via a remote session. 5 | # 6 | # http://unix.stackexchange.com/a/9607 7 | ############################################################################### 8 | 9 | if [ -z "${SESSION_TYPE}" ] 10 | then 11 | if [ -n "${SSH_CLIENT}" ] || [ -n "${SSH_TTY}" ] 12 | then 13 | SESSION_TYPE="remote/ssh" 14 | elif ps > /dev/null 2>&1 15 | then # Not in macOS sandbox (https://stackoverflow.com/a/38598203) 16 | case $(ps -o comm= -p ${PPID}) in 17 | sshd|*/sshd) 18 | SESSION_TYPE="remote/ssh" 19 | ;; 20 | esac 21 | fi 22 | 23 | export SESSION_TYPE 24 | fi 25 | -------------------------------------------------------------------------------- /home/.config/sublime-text-3/Packages/User/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "auto_indent": true, 3 | "color_inactive_tabs": true, 4 | "color_inactive_tabs_comment": "Afterglow inactive GUI tab setting", 5 | "color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme", 6 | "detect_indentation": true, 7 | "draw_white_space": "all", 8 | "font_face": "Menlo", 9 | "font_size": 11.0, 10 | "highlight_line": true, 11 | "ignored_packages": 12 | [ 13 | "SideBarGit" 14 | ], 15 | "rulers": 16 | [ 17 | 80 18 | ], 19 | "scroll_past_end": true, 20 | "tab_size": 2, 21 | "tabs_small": true, 22 | "tabs_small_comment": "Afterflow GUI tab size setting", 23 | "theme": "Afterglow.sublime-theme", 24 | "translate_tabs_to_spaces": true, 25 | "wide_caret": true, 26 | "word_wrap": true 27 | } 28 | -------------------------------------------------------------------------------- /home/.newsbeuter/urls: -------------------------------------------------------------------------------- 1 | http://feeds.feedburner.com/alistapart/main?format=xml 2 | https://aws.amazon.com/blogs/aws/feed/ 3 | http://feeds.arstechnica.com/arstechnica/index?format=xml 4 | https://changelog.com/feed/ 5 | http://daringfireball.net/feeds/articles 6 | http://feeds.feedburner.com/GiantRobotsSmashingIntoOtherGiantRobots?format=xml 7 | http://golangweekly.com/rss/11phfpnf 8 | http://iosdevweekly.com/issues.rss 9 | http://lambda-the-ultimate.org/rss.xml 10 | https://news.ycombinator.com/rss 11 | http://nodeweekly.com/rss/1l9f0f35 12 | http://nshipster.com/feed.xml 13 | http://www.objc.io/feed.xml 14 | http://feeds.feedburner.com/oreilly/news?format=xml 15 | http://recode.net/feed/ 16 | http://rubyweekly.com/rss/2013eaed 17 | http://techcrunch.com/feed/ 18 | https://www.webkit.org/blog/feed/ 19 | -------------------------------------------------------------------------------- /home/.shared_env.d/rvm.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # RVM 3 | # 4 | # Ruby Version Manager (RVM) 5 | # 6 | # RVM is a command-line tool which allows you to easily install, manage, and 7 | # work with multiple ruby environments from interpreters to sets of gems. 8 | # 9 | # https://rvm.io/ 10 | ############################################################################### 11 | 12 | # _enable_rvm() 13 | # 14 | # Usage: 15 | # _enable_rvm 16 | # 17 | # Description: 18 | # Initialize RVM. 19 | _enable_rvm() { 20 | if [[ -s "${HOME}/.rvm/scripts/rvm" ]] 21 | then 22 | source "${HOME}/.rvm/scripts/rvm" 23 | fi 24 | } 25 | 26 | # Only enable RVM on Ubuntu. 27 | if [[ "$(uname -a)" =~ Ubuntu ]] 28 | then 29 | _enable_rvm 30 | fi 31 | -------------------------------------------------------------------------------- /home/.atom/snippets.cson: -------------------------------------------------------------------------------- 1 | # Your snippets 2 | # 3 | # Atom snippets allow you to enter a simple prefix in the editor and hit tab to 4 | # expand the prefix into a larger code block with templated values. 5 | # 6 | # You can create a new snippet in this file by typing "snip" and then hitting 7 | # tab. 8 | # 9 | # An example CoffeeScript snippet to expand log to console.log: 10 | # 11 | # '.source.coffee': 12 | # 'Console log': 13 | # 'prefix': 'log' 14 | # 'body': 'console.log $1' 15 | # 16 | # Each scope (e.g. '.source.coffee' above) can only be declared once. 17 | # 18 | # This file uses CoffeeScript Object Notation (CSON). 19 | # If you are unfamiliar with CSON, you can read more about it in the 20 | # Atom Flight Manual: 21 | # https://atom.io/docs/latest/using-atom-basic-customization#cson 22 | -------------------------------------------------------------------------------- /home/.bashrc.d/git.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Git 3 | ############################################################################### 4 | 5 | alias gb='git branch' 6 | alias gba='git branch -a' 7 | alias gstat='git status' 8 | alias gc='git commit -v' 9 | alias gca='git commit -v -a' 10 | alias gd='git diff | mate' 11 | alias gl='git pull' 12 | alias gp='git push' 13 | alias glog="git log \ 14 | --all \ 15 | --graph \ 16 | --pretty=format:'%Cred%h%Creset -%C(magenta)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \ 17 | --abbrev-commit \ 18 | --date=relative" 19 | 20 | # Alias the `git` command to the `hub` command. 21 | # http://github.com/defunkt/hub 22 | if command_exists "hub" 23 | then 24 | alias git="hub" 25 | fi 26 | -------------------------------------------------------------------------------- /home/.overcast/example.clusters.json: -------------------------------------------------------------------------------- 1 | { 2 | "dummy-app-cluster": { 3 | "instances": { 4 | "dummy.app.01": { 5 | "ip": "127.0.0.1", 6 | "name": "dummy.01", 7 | "ssh_key": "/Users/username/.ssh/id_rsa", 8 | "ssh_port": "22222", 9 | "user": "root" 10 | }, 11 | "dummy.app.02": { 12 | "ip": "127.0.0.2", 13 | "name": "dummy.02", 14 | "ssh_key": "overcast.key", 15 | "ssh_port": "22", 16 | "user": "root" 17 | } 18 | } 19 | }, 20 | "dummy-db-cluster": { 21 | "instances": { 22 | "dummy.db.01": { 23 | "ip": "127.0.0.3", 24 | "name": "dummy.03", 25 | "ssh_key": "overcast.key", 26 | "ssh_port": "22", 27 | "user": "root" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /home/.zshrc.d/iterm2.zsh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # iTerm2 Shell Integration 3 | # 4 | # iTerm2 may be integrated with the unix shell so that it can keep track of 5 | # your command history, current working directory, host name, and more--even 6 | # over ssh. This enables several useful features. 7 | # 8 | # Usage: 9 | # https://iterm2.com/shell_integration.html 10 | # 11 | # https://www.iterm2.com/ 12 | # https://github.com/gnachman/iTerm2 13 | ############################################################################### 14 | 15 | # zsh integration startup file 16 | # 17 | # Received via command: 18 | # curl -L https://iterm2.com/misc/zsh_startup.in >> \ 19 | # ~/.iterm2_shell_integration.zsh 20 | source "${HOME}/.iterm2_shell_integration.zsh" 21 | -------------------------------------------------------------------------------- /home/.bashrc.d/z.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Z 3 | # 4 | # Tracks your most used directories, based on 'frecency'. 5 | # 6 | # After a short learning phase, z will take you to the most 'frecent' 7 | # directory that matches ALL of the regexes given on the command line, in 8 | # order. 9 | # 10 | # For example, z foo bar would match /foo/bar but not /bar/foo. 11 | # 12 | # https://github.com/rupa/z/ 13 | # 14 | # Expects installation via homebrew 15 | ################################################################################ 16 | 17 | 18 | if command_exists "brew" 19 | then 20 | __BREW_PREFIX="$(brew --prefix)" 21 | if [ -f "${__BREW_PREFIX}/etc/profile.d/z.sh" ] 22 | then 23 | . "${__BREW_PREFIX}/etc/profile.d/z.sh" 24 | fi 25 | fi 26 | -------------------------------------------------------------------------------- /home/.shared_env.d/paths.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # paths.sh 3 | # 4 | # $PATH settings. 5 | # 6 | # Note: Additional $PATH initialization in /etc/paths and /etc/paths.d 7 | ############################################################################### 8 | 9 | export PATH 10 | 11 | # Add homebrew-managed /usr/local/sbin to $PATH 12 | PATH="/usr/local/sbin:${PATH}" 13 | 14 | # Add ~/.local/bin to $PATH 15 | # 16 | # `pip install` with the `--user` option installs executables in ~/.local/bin, 17 | # at least on Ubuntu. ~/.local is part of the XDG Base Directory Specification. 18 | # 19 | # More info about ~/.local: 20 | # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html 21 | # http://askubuntu.com/a/14536 22 | PATH="${HOME}/.local/bin:${PATH}" 23 | -------------------------------------------------------------------------------- /home/.hyperlocal/Readme.md: -------------------------------------------------------------------------------- 1 | # .hyperlocal 2 | 3 | Program and data hierarchy for user-installed programs. 4 | 5 | The `$HOME/.hyperlocal` hierarchy mirrors the `/usr/local` hierarchy, but 6 | only applies to the current user. Installing programs to this location 7 | avoids polluting `$HOME`. `$HOME/.local` would have been a logical 8 | name, but this directory is used by GNOME and Ubuntu for application 9 | data, so using this separate directory avoids unexpected conflicts. 10 | 11 | Install programs to this location with `$PREFIX="$HOME/.hyperlocal"` or 12 | `--prefix="$HOME/.hyperlocal"`. 13 | 14 | This is used in a similar manner to the [`$HOME/.bpkg` hierarchy](../.bpkg). 15 | 16 | Additional configuration files: 17 | - [home/.shared_env.d/hyperlocal.sh](../.shared_env.d/hyperlocal.sh) 18 | - [.gitignore](../../.gitignore) 19 | -------------------------------------------------------------------------------- /home/.shared_rc.d/fasd.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # fasd 3 | # 4 | # Command-line productivity booster, offers quick access to files and 5 | # directories, inspired by autojump, z and v. 6 | # 7 | # NOTE: installed via homebrew. 8 | # 9 | # https://github.com/clvv/fasd 10 | ############################################################################### 11 | 12 | # Initialize all. 13 | # 14 | # This will setup a command hook that executes on every command and advanced 15 | # tab completion for zsh and bash. 16 | # 17 | # For more specific initialization options, see: 18 | # https://github.com/clvv/fasd#install 19 | if command_exists "fasd" 20 | then 21 | eval "$(fasd --init auto)" 22 | fi 23 | 24 | # Remove `s` alias so it can be used for other things. 25 | unalias s 26 | -------------------------------------------------------------------------------- /home/.htoprc: -------------------------------------------------------------------------------- 1 | # Beware! This file is rewritten by htop when settings are changed in the interface. 2 | # The parser is also very primitive, and not human-friendly. 3 | fields=0 48 17 18 38 39 2 46 47 49 1 4 | sort_key=46 5 | sort_direction=1 6 | hide_threads=0 7 | hide_kernel_threads=0 8 | hide_userland_threads=0 9 | shadow_other_users=0 10 | show_thread_names=0 11 | show_program_path=1 12 | highlight_base_name=1 13 | highlight_megabytes=1 14 | highlight_threads=1 15 | tree_view=0 16 | header_margin=1 17 | detailed_cpu_time=1 18 | cpu_count_from_zero=0 19 | update_process_names=0 20 | account_guest_in_cpu_meter=0 21 | color_scheme=5 22 | delay=15 23 | left_meters=CPU AllCPUs2 Memory Swap 24 | left_meter_modes=3 1 1 1 25 | right_meters=Clock Blank Tasks LoadAverage Uptime Hostname Clock Battery 26 | right_meter_modes=4 2 2 2 2 2 2 1 27 | -------------------------------------------------------------------------------- /home/.mutt/accounts/exchange@example.com.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .mutt/accounts/exchange@example.com 3 | # 4 | # Example settings for an exchange mutt account. 5 | ############################################################################### 6 | 7 | export MUTT_PROVIDER="exchange" 8 | export MUTT_ACCOUNT_EMAIL="exchange@example.com" 9 | export MUTT_ACCOUNT_REALNAME="FirstName LastName" 10 | export MUTT_ACCOUNT_SMTP_SERVER="smtp.example.com" 11 | export MUTT_ACCOUNT_IMAP_SERVER="imap.example.com" 12 | # Example OS X keychain password retrieval. 13 | export MUTT_ACCOUNT_PASSWORD="$( 14 | security find-generic-password \ 15 | -gs "${MUTT_ACCOUNT_EMAIL}" \ 16 | ${HOME}/Library/Keychains/login.keychain 2>&1 \ 17 | | grep password \ 18 | | cut -d '"' -f 2 19 | )" 20 | -------------------------------------------------------------------------------- /home/.rbenv/default-gems: -------------------------------------------------------------------------------- 1 | # bundler 2 | # 3 | # Bundler provides a consistent environment for Ruby projects by tracking and 4 | # installing the exact gems and versions that are needed. 5 | # 6 | # http://bundler.io/ 7 | # https://github.com/bundler/bundler 8 | # https://rubygems.org/gems/bundler 9 | bundler 10 | 11 | # Awesome Print 12 | # 13 | # Awesome Print is a Ruby library that pretty prints Ruby objects in full 14 | # color exposing their internal structure with proper indentation. Rails 15 | # ActiveRecord objects and usage within Rails templates are supported via 16 | # included mixins. 17 | # 18 | # https://github.com/michaeldv/awesome_print 19 | # https://rubygems.org/gems/awesome_print 20 | awesome_print 21 | 22 | # Pry 23 | # 24 | # An IRB alternative and runtime developer console 25 | # 26 | # https://github.com/pry/pry 27 | # https://rubygems.org/gems/pry 28 | pry 29 | -------------------------------------------------------------------------------- /script/install/orphans: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # orphans 4 | # 5 | # Install various orphans. 6 | ############################################################################### 7 | 8 | # View descriptions with `orphans help ` 9 | 10 | # UP .......................................................................... 11 | 12 | # orphans alcatraz:up 13 | orphans ammonite:up 14 | orphans bish:up 15 | orphans iota:up 16 | orphans meteor:up 17 | [[ "$OSTYPE" =~ ^linux ]] && orphans multirust:up 18 | orphans neovim_dot_app:up 19 | orphans rosetta:up 20 | orphans xsv:up 21 | orphans zindex:up 22 | 23 | # DOWN ........................................................................ 24 | 25 | # multirust is installed via homebrew on OS X. 26 | [[ "$OSTYPE" =~ ^darwin ]] && orphans multirust:down 27 | -------------------------------------------------------------------------------- /home/.shared_rc.d/nix.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # nix 3 | # 4 | # Nix is a powerful package manager for Linux and other Unix systems that 5 | # makes package management reliable and reproducible. It provides atomic 6 | # upgrades and rollbacks, side-by-side installation of multiple versions of a 7 | # package, multi-user package management and easy setup of build environments. 8 | # 9 | # https://nixos.org/nix/ 10 | # 11 | # See also: 12 | # https://www.domenkozar.com/2014/01/02/getting-started-with-nix-package-manager/ 13 | ############################################################################### 14 | 15 | # Initialize nix if it's installed. 16 | nix_init() { 17 | _nix_sh_path="${HOME}/.nix-profile/etc/profile.d/nix.sh" 18 | if [[ -e "${_nix_sh_path}" ]] 19 | then 20 | . "${_nix_sh_path}" 21 | fi 22 | } 23 | nix_init 24 | -------------------------------------------------------------------------------- /script/install/cargo-packages: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Cargo: packages for Rust 3 | # 4 | # The Rust community’s crate host 5 | # 6 | # Cargo is a tool that allows Rust projects to declare their various 7 | # dependencies and ensure that you’ll always get a repeatable build. 8 | # 9 | # https://crates.io/ 10 | ############################################################################### 11 | 12 | # ripgrep 13 | # 14 | # ripgrep is a command line search tool that combines the usability of The 15 | # Silver Searcher (an ack clone) with the raw speed of GNU grep. ripgrep has 16 | # first class support on Windows, Mac and Linux, with binary downloads 17 | # available for every release. 18 | # 19 | # https://github.com/BurntSushi/ripgrep 20 | # http://blog.burntsushi.net/ripgrep/ 21 | # https://news.ycombinator.com/item?id=12564442 22 | cargo install ripgrep 23 | -------------------------------------------------------------------------------- /home/.bashrc.d/awscli.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # AWS Command Line Interface (CLI) 3 | # 4 | # The AWS Command Line Interface (CLI) is a unified tool to manage your AWS 5 | # services. With just one tool to download and configure, you can control 6 | # multiple AWS services from the command line and automate them through 7 | # scripts. 8 | # 9 | # The AWS CLI introduces a new set of simple file commands for efficient file 10 | # transfers to and from Amazon S3. 11 | # 12 | # https://aws.amazon.com/cli/ 13 | ############################################################################### 14 | 15 | # Load Bash autocompletion. 16 | # http://docs.aws.amazon.com/cli/latest/userguide/cli-command-completion.html 17 | _aws_bash_completer="/usr/local/bin/aws_completer" 18 | if [[ -e "$_aws_bash_completer" ]] 19 | then 20 | complete -C "$_aws_bash_completer" aws 21 | fi 22 | -------------------------------------------------------------------------------- /home/.config/sublime-text-3/Packages/User/Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "bootstrapped": true, 3 | "in_process_packages": 4 | [ 5 | "SideBarGit" 6 | ], 7 | "installed_packages": 8 | [ 9 | "AutoFileName", 10 | "BracketHighlighter", 11 | "CoffeeScriptHaml", 12 | "ColorPicker", 13 | "Colorsublime", 14 | "Dockerfile Syntax Highlighting", 15 | "Dotfiles Syntax Highlighting", 16 | "GenerateUUID", 17 | "GitGutter", 18 | "GoSublime", 19 | "Haml", 20 | "HexViewer", 21 | "Jade", 22 | "Markdown Extended", 23 | "Package Control", 24 | "Python Improved", 25 | "RSpec", 26 | "Sass", 27 | "SideBarGit", 28 | "SublimeLinter", 29 | "SublimeLinter-contrib-scss-lint", 30 | "SublimeLinter-ruby", 31 | "SublimeREPL", 32 | "Theme - Afterglow", 33 | "Theme - Soda", 34 | "Theme - Spacegray", 35 | "TrailingSpaces", 36 | "Twilightcyanide Colorscheme", 37 | "Vagrant" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /home/.fzf.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # fzf 3 | # 4 | # fzf is a general-purpose command-line fuzzy finder. 5 | # 6 | # https://github.com/junegunn/fzf 7 | # 8 | # File locations: 9 | # - ~/.fzf 10 | # - ~/.fzf.bash 11 | # - ~/.fzf.zsh 12 | # - ~/.profile.d/fzf.sh 13 | ############################################################################### 14 | 15 | # Setup fzf 16 | # --------- 17 | if [[ ! "$PATH" =~ "$HOME"/.fzf/bin ]]; then 18 | export PATH="$PATH:$HOME/.fzf/bin" 19 | fi 20 | 21 | # Man path 22 | # -------- 23 | if [[ ! "$MANPATH" =~ "$HOME"/.fzf/man && -d "$HOME/.fzf/man" ]]; then 24 | export MANPATH="$MANPATH:$HOME/.fzf/man" 25 | fi 26 | 27 | # Auto-completion 28 | # --------------- 29 | [[ $- =~ i ]] && source "$HOME/.fzf/shell/completion.bash" 30 | 31 | # Key bindings 32 | # ------------ 33 | source "$HOME/.fzf/shell/key-bindings.bash" 34 | 35 | -------------------------------------------------------------------------------- /home/.fzf.zsh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # fzf 3 | # 4 | # fzf is a general-purpose command-line fuzzy finder. 5 | # 6 | # https://github.com/junegunn/fzf 7 | # 8 | # File locations: 9 | # - ~/.fzf 10 | # - ~/.fzf.bash 11 | # - ~/.fzf.zsh 12 | # - ~/.profile.d/fzf.sh 13 | ############################################################################### 14 | 15 | # Setup fzf 16 | # --------- 17 | if [[ ! "$PATH" =~ "$HOME"/.fzf/bin ]]; then 18 | export PATH="$PATH:$HOME/.fzf/bin" 19 | fi 20 | 21 | # Man path 22 | # -------- 23 | if [[ ! "$MANPATH" =~ "$HOME"/.fzf/man && -d "$HOME/.fzf/man" ]]; then 24 | export MANPATH="$MANPATH:$HOME/.fzf/man" 25 | fi 26 | 27 | # Auto-completion 28 | # --------------- 29 | # [[ $- =~ i ]] && source "$HOME/.fzf/shell/completion.zsh" 30 | 31 | # Key bindings 32 | # ------------ 33 | source "$HOME/.fzf/shell/key-bindings.zsh" 34 | 35 | -------------------------------------------------------------------------------- /boxes/scripts/provision.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # provision.bash 4 | # 5 | # Initialize dotfiles. 6 | # 7 | # To use with Vagrant, add the following to a Vagrantfile: 8 | # 9 | # dotfiles_url = "https://raw.githubusercontent.com/alphabetum/dotfiles/master" 10 | # config.vm.provision "shell", 11 | # path: "#{dotfiles_url}/boxes/scripts/provision.bash", 12 | # privileged: false 13 | ############################################################################### 14 | 15 | # Only clone if ~/.bindle doesn't exist. 16 | # 17 | # This makes it possible to run this script multiple times without exiting 18 | # due to a failed clone. 19 | if [[ ! -e "${HOME}/.bindle" ]] 20 | then 21 | git clone https://github.com/alphabetum/dotfiles.git "$HOME/.bindle" 22 | fi 23 | 24 | "$HOME/.bindle/script/bootstrap/linux" 25 | -------------------------------------------------------------------------------- /home/.ssh/config.d/example.com.sshconfig: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # example.com.sshconfig 3 | # 4 | # An example ssh config file containing configuration information for a single 5 | # host. A file like this could also be used to hold information for a multiple 6 | # related hosts. 7 | # 8 | # When the `ssh` command runs, all of the files in `.ssh/config.d` are 9 | # combined with `~/.ssh/default.sshconfig` into a`.ssh/config` file. The 10 | # `.ssh/config` file can also be generated manually using the 11 | # `generate_ssh_config` shell function. 12 | # 13 | # See also: $HOME/.shared_rc.d/ssh.sh 14 | # 15 | # More information: http://superuser.com/q/247564 16 | ############################################################################### 17 | 18 | Host example.com 19 | port 22 20 | PubkeyAuthentication yes 21 | User username 22 | IdentityFile ~/.ssh/id_example 23 | -------------------------------------------------------------------------------- /home/.zshrc.d/awscli.zsh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # AWS Command Line Interface (CLI) 3 | # 4 | # The AWS Command Line Interface (CLI) is a unified tool to manage your AWS 5 | # services. With just one tool to download and configure, you can control 6 | # multiple AWS services from the command line and automate them through 7 | # scripts. 8 | # 9 | # The AWS CLI introduces a new set of simple file commands for efficient file 10 | # transfers to and from Amazon S3. 11 | # 12 | # https://aws.amazon.com/cli/ 13 | ############################################################################### 14 | 15 | # Load zsh autocompletion. 16 | # 17 | # http://docs.aws.amazon.com/cli/latest/userguide/cli-command-completion.html 18 | __aws_zsh_completer="/usr/local/bin/aws_zsh_completer.sh" 19 | if [[ -e "${__aws_zsh_completer}" ]] 20 | then 21 | source "${__aws_zsh_completer}" 22 | fi 23 | -------------------------------------------------------------------------------- /home/.mailcap: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # home/.mailcap 3 | # 4 | # Resources: 5 | # https://en.wikipedia.org/wiki/Mailcap 6 | # http://linux.die.net/man/4/mailcap 7 | # http://tools.ietf.org/html/rfc1524 8 | # http://www.washington.edu/pine/faq/mailcap.sample 9 | # http://www.mutt.org/doc/manual/manual-5.html 10 | # http://www.mutt.org/doc/devel/manual.html#mailcap 11 | # http://jasonwryan.com/blog/2012/05/12/mutt/ 12 | ############################################################################### 13 | 14 | text/html; w3m -I %{charset} -T text/html; copiousoutput; 15 | 16 | # Images 17 | # 18 | # Display images with `icat`, an inline image display tool for iterm2. 19 | # https://github.com/alphabetum/dotfiles/blob/master/bin/icat 20 | image/jpg; icat --wait 21 | image/jpeg; icat --wait 22 | image/pjpeg; icat --wait 23 | image/png; icat --wait 24 | image/gif; icat --wait 25 | -------------------------------------------------------------------------------- /home/.shared_env.d/linuxbrew.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Linuxbrew 3 | # 4 | # Linuxbrew is a fork of Homebrew, the Mac OS package manager, for Linux. 5 | # 6 | # Features: 7 | # - Can install software to a home directory and so does not require sudo 8 | # - Install software not packaged by the native distribution 9 | # - Install up-to-date versions of software when the native distribution is old 10 | # - Use the same package manager to manage both your Mac and Linux machines 11 | # 12 | # http://brew.sh/linuxbrew/ 13 | # https://github.com/Homebrew/linuxbrew 14 | ############################################################################### 15 | 16 | # Linuxbrew environment variables. 17 | if is_linux 18 | then 19 | export PATH="${HOME}/.linuxbrew/bin:${PATH}" 20 | export MANPATH="${HOME}/.linuxbrew/share/man:${MANPATH}" 21 | export INFOPATH="${HOME}/.linuxbrew/share/info:${INFOPATH}" 22 | fi 23 | -------------------------------------------------------------------------------- /home/.gntrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .gntrc 3 | # 4 | # GNT - The GLib Ncurses Toolkit 5 | # 6 | # GNT is an ncurses toolkit for creating text-mode graphical user interfaces 7 | # in a fast and easy way. Part of the Finch project. 8 | # 9 | # Configuration for gnt applications. 10 | ############################################################################### 11 | 12 | [general] 13 | # Enable mouse 14 | mouse = 1 15 | 16 | # Finch 17 | # 18 | # A Pimpin' Penguin console frontend to libpurple. Instant Messaging client. 19 | # 20 | # A text-based user interface for using libpurple. This can be run from a 21 | # standard text console or from a terminal within X Windows. It 22 | # uses ncurses and our homegrown gnt library for drawing windows 23 | # and text. 24 | # 25 | # https://developer.pidgin.im/wiki/Using%20Finch 26 | # http://linux.die.net/man/1/finch 27 | [Finch] 28 | # Enable mouse 29 | mouse = 1 30 | -------------------------------------------------------------------------------- /home/.shared_env.d/opam.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # OPAM / OCaml env configuration 3 | # 4 | # The settings here are the output of the `opam config env` command, with some 5 | # slight edits, specifically splitting them up to invidisual lines and using 6 | # `$HOME` for the home path segment rather than the hard-coded home directory. 7 | ############################################################################### 8 | 9 | CAML_LD_LIBRARY_PATH="${HOME}/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs" 10 | export CAML_LD_LIBRARY_PATH 11 | 12 | OPAMUTF8MSGS="1" 13 | export OPAMUTF8MSGS 14 | 15 | MANPATH="${MANPATH}:${HOME}/.opam/system/man" 16 | export MANPATH 17 | 18 | PERL5LIB="${HOME}/.opam/system/lib/perl5:${PERL5LIB}" 19 | export PERL5LIB 20 | 21 | OCAML_TOPLEVEL_PATH="${HOME}/.opam/system/lib/toplevel" 22 | export OCAML_TOPLEVEL_PATH 23 | 24 | PATH="${HOME}/.opam/system/bin:${PATH}" 25 | export PATH 26 | -------------------------------------------------------------------------------- /home/.hgrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .hgrc 3 | # 4 | # Configuration for Mercurial / hg 5 | # 6 | # http://www.selenic.com/mercurial/hgrc.5.html 7 | ############################################################################### 8 | 9 | [amp] 10 | workflow = hg 11 | [ui] 12 | ignore=~/.hgignore_global 13 | [merge-tools] 14 | sourcetreemerge.gui=False 15 | sourcetreebulkmerge.gui=False 16 | sourcetreemerge.binary=False 17 | sourcetreebulkmerge.executable=/Applications/SourceTree.app/Contents/Resources/hg-merge.sh 18 | sourcetreemerge.args=$local $other -ancestor $base -merge $output 19 | sourcetreemerge.checkconflicts=True 20 | sourcetreemerge.premerge=True 21 | sourcetreemerge.executable=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh 22 | sourcetreebulkmerge.premerge=False 23 | sourcetreebulkmerge.binary=True 24 | [extdiff] 25 | cmd.sourcetreediff=opendiff 26 | opts.sourcetreediff= 27 | %include ~/.hgrc.local 28 | -------------------------------------------------------------------------------- /home/.orphans/hr.bash: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/.hyperlocal" 2 | export BIN="$PREFIX/bin" 3 | export MAN="$PREFIX/share/man/man1" 4 | 5 | desc "hr:up" <\` for your terminal. 11 | 12 | https://github.com/LuRsT/hr 13 | EOM 14 | hr:up() { 15 | 16 | # Don't install if already installed. 17 | [[ -f "$PREFIX/bin/hr" ]] && "hr already installed.\n" && exit 0 18 | 19 | [[ ! -d "$BIN" ]] && mkdir -p "$BIN" 20 | curl https://raw.githubusercontent.com/LuRsT/hr/master/hr > \ 21 | "$BIN/hr" 22 | chmod +x "$BIN/hr" 23 | 24 | [[ ! -d "$MAN" ]] && mkdir -p "$MAN" 25 | curl https://raw.githubusercontent.com/LuRsT/hr/master/hr.1 > \ 26 | "$MAN/hr.1" 27 | } 28 | 29 | desc "hr:down" <> Uninstalling hr\n" 38 | [[ -e "$BIN/hr" ]] && _remove "$BIN/hr" 39 | [[ -e "$MAN/hr.1" ]] && _remove "$MAN/hr.1" 40 | } 41 | -------------------------------------------------------------------------------- /bin/manp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ "$1" == "-h" || "$1" == "--help" ]]; then cat </dev/null 2>&1 33 | 34 | # Open PDF (if it does exist). 35 | [[ -e "$file" ]] && open "$file" 36 | -------------------------------------------------------------------------------- /home/.shared_env.d/shellcheck.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # ShellCheck 3 | # 4 | # Automatically detects problems with sh/bash scripts and commands 5 | # 6 | # http://www.shellcheck.net// 7 | ############################################################################### 8 | 9 | # TODO: implement this. 10 | # 11 | # # Wrap `shellcheck` command in a function that looks for a configuration 12 | # # file containing rules to ignore when the command is run. For a simple 13 | # # implementation, the rules could be listed on each line. 14 | # # 15 | # # More info: https://github.com/koalaman/shellcheck/wiki/Ignore 16 | # 17 | # _SHELLCHECK_CMD="$(which shellcheck)" 18 | # shellcheck() { 19 | # if (file with shellehck rule disables is in this directory or any parent) 20 | # then 21 | # for each rule, add to the SHELLCHECK_OPTS variable: 22 | # export SHELLCHECK_OPTS="-e SC2059" 23 | # else 24 | # export SHELLCHECK_OPTS="" 25 | # fi 26 | # } 27 | -------------------------------------------------------------------------------- /home/.shared_rc.d/clear.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .shared_rc.d/clear.sh 3 | # 4 | # A wrapper for `clear` that includes clearing the scroll-back buffer. 5 | ############################################################################### 6 | 7 | _CLEAR_COMMAND="$(which clear)" 8 | clear() { 9 | if [ "$1" = "-h" ] || [ "$1" = "--help" ] 10 | then 11 | cat < /dev/null 15 | then 16 | ccal 17 | else 18 | _TODAY=$(date +%e) 19 | _B=$(tput smso) 20 | _N=$(tput rmso) 21 | printf "\n" 22 | cal | sed s/"$_TODAY"/"$_B""$_TODAY""$_N"/ 23 | fi 24 | } 25 | 26 | usage="\ 27 | Usage: now 28 | 29 | Description: 30 | Display the current time and date, followed by a calendar with the current 31 | date highlighted. 32 | 33 | Output (so you don't have to run it again): 34 | 35 | $(__now) 36 | " 37 | if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]] 38 | then 39 | printf "%s\n" "$usage" 40 | exit 0 41 | fi 42 | 43 | __now 44 | -------------------------------------------------------------------------------- /home/.shared_rc.d/ruby.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Ruby 3 | ############################################################################### 4 | 5 | ############################################################################### 6 | # `ruby` on its own launches irb. Have `ruby` call `irb` when there is no 7 | # argument. 8 | ############################################################################### 9 | ruby_or_irb() { 10 | if [ -z "$1" ] 11 | then 12 | irb 13 | else 14 | ruby "$@" 15 | fi 16 | } 17 | alias ruby="ruby_or_irb" 18 | 19 | ############################################################################### 20 | # Alias `bundle exec` to `be` 21 | ############################################################################### 22 | 23 | alias be="bundle exec" 24 | 25 | ############################################################################### 26 | # Rails 27 | ############################################################################### 28 | 29 | alias bgi="bundle exec guard -i; return 0" 30 | -------------------------------------------------------------------------------- /home/.ackrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # ackrc 3 | # 4 | # ack is a tool like grep, optimized for programmers 5 | # 6 | # http://beyondgrep.com/ 7 | # 8 | # Docs: 9 | # http://beyondgrep.com/documentation/ 10 | # http://beyondgrep.com/documentation/ack-2.12-man.html#ackrc_location_semantics 11 | ############################################################################### 12 | 13 | # Always color, even if piping to a another program 14 | --color 15 | 16 | # Ignore IntelliJ IDEA project directories. 17 | --ignore-directory=is:.idea 18 | 19 | # Ignore rvm / Ruby Version Manager .rvm directory. 20 | # 21 | # Reason: contains Rubies and Ruby environments and is very large. 22 | --ignore-directory=is:.rvm 23 | 24 | # Ignore rbenv .rbenv directory. 25 | # 26 | # Reason: contains Rubies and Ruby environments and is very large. 27 | --ignore-directory=is:.rbenv 28 | 29 | # Ignore sass-cache directories 30 | --ignore-directory=is:sass-cache 31 | # Ignore compiled sass and scssc files 32 | --ignore-file=ext:scssc 33 | --ignore-file=ext:sassc 34 | -------------------------------------------------------------------------------- /script/install/apt-packages.d/apt-ruby-build-packages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # apt-ruby-build-packages 4 | # 5 | # via: https://github.com/rbenv/ruby-build/wiki 6 | ############################################################################### 7 | 8 | ############################################################################### 9 | # Platform Check 10 | ############################################################################### 11 | 12 | if ! hash "apt-get" 2>/dev/null 13 | then 14 | printf "apt-packages requires APT.\nSkipping...\n" 15 | exit 0 16 | fi 17 | 18 | ############################################################################### 19 | # Packages 20 | ############################################################################### 21 | 22 | sudo apt-get install \ 23 | autoconf \ 24 | bison \ 25 | build-essential \ 26 | libssl-dev \ 27 | libyaml-dev \ 28 | libreadline6-dev \ 29 | zlib1g-dev \ 30 | libncurses5-dev \ 31 | libffi-dev \ 32 | libgdbm3 \ 33 | libgdbm-dev 34 | -------------------------------------------------------------------------------- /home/.cabal/README.md: -------------------------------------------------------------------------------- 1 | # Haskell Cabal `config` file info 2 | 3 | ## `config` / `config.template` 4 | 5 | The `config` file in this directory is generated using the `config.template` 6 | file because the paths in `.cabal/config` have to be absolute paths 7 | and therefore end up containing user-specific information. 8 | 9 | To make changes to the configuration, edit `config.template` and then 10 | generate a new `config` file using the `generate_config.sh` script. 11 | 12 | ## `config.platform` 13 | 14 | The `config.platform` file is an untracked file installed by the haskell 15 | platform installation process and demonstrates the expected standard 16 | configuration for the platform (OS X). 17 | 18 | The `config.platform` file is not used directly, but is used for 19 | reference. As noted in the help wiki: 20 | 21 | > the config file for this layout is placed in `~/.cabal/config.platform` and 22 | > you can manually move it over, or incorporate it into your existing config 23 | > file. 24 | 25 | For more information, see: 26 | 27 | https://wiki.haskell.org/Mac_OS_X_Common_Installation_Paths 28 | -------------------------------------------------------------------------------- /home/.shared_env.d/autoenv.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Autoenv: Directory-based Environments 3 | # 4 | # If a directory contains a `.env` file, it will automatically be executed 5 | # when you `cd` into it. 6 | # 7 | # This is great for... 8 | # 9 | # - auto-activating virtualenvs 10 | # - project-specific environment variables 11 | # - making millions 12 | # - Foreman env files are completely compatible. 13 | # 14 | #You can also nest envs within eachother. 15 | # 16 | # https://github.com/kennethreitz/autoenv 17 | ############################################################################### 18 | 19 | # Initialize 20 | # 21 | # NOTE: Temporarily disabled. iTerm 2 experiences a slowdown over time, 22 | # especially after `cd`ing around a lot. Autoenv overrides `cd`, so 23 | # temporarily disbled autoenv to see whether the issue is caused by or related 24 | # to this in some way. 25 | # TODO: reenable or uninstall. 26 | # if [[ -e "/usr/local/opt/autoenv/activate.sh" ]] 27 | # then 28 | # source "/usr/local/opt/autoenv/activate.sh" 29 | # fi 30 | -------------------------------------------------------------------------------- /home/.orphans/meteor.bash: -------------------------------------------------------------------------------- 1 | desc "meteor:up" <> Installing meteor\n" 24 | curl https://install.meteor.com | /bin/sh 25 | } 26 | 27 | desc "meteor:down" <> Uninstalling meteor\n" 36 | [[ -e "$HOME/.meteor/" ]] && _remove "$HOME/.meteor/" 37 | [[ -e "/usr/local/bin/meteor" ]] && _remove "/usr/local/bin/meteor" 38 | } 39 | -------------------------------------------------------------------------------- /home/.bashrc.d/iterm2.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # iTerm2 Shell Integration 3 | # 4 | # iTerm2 may be integrated with the unix shell so that it can keep track of 5 | # your command history, current working directory, host name, and more--even 6 | # over ssh. This enables several useful features. 7 | # 8 | # Usage: 9 | # https://iterm2.com/shell_integration.html 10 | # 11 | # https://www.iterm2.com/ 12 | # https://github.com/gnachman/iTerm2 13 | ############################################################################### 14 | 15 | # bash integration startup file 16 | # 17 | # Received via command: 18 | # curl -L https://iterm2.com/misc/bash_startup.in >> \ 19 | # ~/.iterm2_shell_integration.bash 20 | # 21 | # NOTE: when `$TERM` is set to "dumb" and possibly when it's blank, this 22 | # script prints unexpected output. Avoid this by skipping the sourcing of this 23 | # shell integration script unless `$TERM` is set to something else. 24 | if [[ -n "$TERM" ]] && [[ "$TERM" != "dumb" ]] 25 | then 26 | source "$HOME/.iterm2_shell_integration.bash" 27 | fi 28 | -------------------------------------------------------------------------------- /bin/snow: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # _____ _____ _____ __ __ 4 | # / ___>/ _ \/ _ \/ / \ 5 | # |___ || | || | || /\ | 6 | # <_____/\__|__/\_____/\__/\__/ 7 | # 8 | # snow 9 | # 10 | # Display a falling snow / snowing animation in the command line / terminal. 11 | # 12 | # Source: unknown. 13 | 14 | LINES=$(tput lines) 15 | COLUMNS=$(tput cols) 16 | 17 | declare -A snowflakes 18 | declare -A lastflakes 19 | 20 | clear 21 | 22 | move_flake() { 23 | i="$1" 24 | 25 | if [ "${snowflakes[$i]}" = "" ] || [ "${snowflakes[$i]}" = "$LINES" ] 26 | then 27 | snowflakes[$i]=0 28 | else 29 | if [ "${lastflakes[$i]}" != "" ] 30 | then 31 | printf "\033[%s;%sH \033[1;1H " "${lastflakes[$i]}" "$i" 32 | fi 33 | fi 34 | 35 | printf "\033[%s;%sH❄\033[1;1H" "${snowflakes[$i]}" "$i" 36 | 37 | lastflakes[$i]=${snowflakes[$i]} 38 | snowflakes[$i]=$((${snowflakes[$i]}+1)) 39 | } 40 | 41 | while : 42 | do 43 | i=$((RANDOM % COLUMNS)) 44 | 45 | move_flake $i 46 | 47 | for x in "${!lastflakes[@]}" 48 | do 49 | move_flake "$x" 50 | done 51 | 52 | sleep 0.1 53 | done 54 | 55 | -------------------------------------------------------------------------------- /home/.orphans/black_screen.bash: -------------------------------------------------------------------------------- 1 | _BLACK_SCREEN_TMP_PATH="/tmp/orphans/black_screen" 2 | 3 | desc "black_screen:up" <> Installing Black Screen\n" 18 | 19 | git clone --recursive \ 20 | "https://github.com/shockone/black-screen.git" "${_BLACK_SCREEN_TMP_PATH}" && 21 | cd "${_BLACK_SCREEN_TMP_PATH}" && 22 | npm run install-all 23 | 24 | printf \ 25 | ">> NOTE: Downloaded to %s but not installed." \ 26 | "${_BLACK_SCREEN_TMP_PATH}" 27 | } 28 | 29 | desc "black_screen:down" <> Uninstalling Black Screen.\n" 38 | [[ -e "{_BLACK_SCREEN_TMP_PATH}" ]] && _remove "${_BLACK_SCREEN_TMP_PATH}" 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 William Melody 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /home/.atom/init.coffee: -------------------------------------------------------------------------------- 1 | # Your init script 2 | # 3 | # Atom will evaluate this file each time a new window is opened. It is run 4 | # after packages are loaded/activated and after the previous editor state 5 | # has been restored. 6 | # 7 | # An example hack to log to the console when each text editor is saved. 8 | # 9 | # atom.workspace.observeTextEditors (editor) -> 10 | # editor.onDidSave -> 11 | # console.log "Saved! #{editor.getPath()}" 12 | 13 | # /////////////////////////////////////////////////////////////////////////// # 14 | 15 | ############################################################################### 16 | # Example "composed" command. 17 | # 18 | # For use with this mapping in keymap.cson: 19 | # 'atom-text-editor': 20 | # 'alt-ctrl-z': 'custom:cut-line' 21 | # 22 | # Via: 23 | # https://atom.io/docs/latest/behind-atom-keymaps-in-depth#composed-commands 24 | ############################################################################### 25 | # atom.commands.add 'atom-text-editor', 'custom:cut-line', -> 26 | # editor = atom.workspace.getActiveTextEditor() 27 | # editor.selectLinesContainingCursors() 28 | # editor.cutSelectedText() 29 | -------------------------------------------------------------------------------- /home/.notesrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .notesrc 3 | # 4 | # Configuration file for notes 5 | # 6 | # https://github.com/alphabetum/notes 7 | ############################################################################### 8 | 9 | # $NOTES_AUTO_SYNC 10 | # 11 | # Default: 1 12 | # 13 | # By default, operations that trigger a git commit like `add`, `edit`, 14 | # and `delete` will also sync notebook changes to the remote repository, if 15 | # one is set. 16 | # 17 | # To disable this behavior, uncomment the following line. 18 | # export NOTES_AUTO_SYNC=0 19 | 20 | # $NOTES_DIR 21 | # 22 | # Default: "$HOME/.notes" 23 | # 24 | # The location of the base notes directory. 25 | # export NOTES_DIR="$HOME/.notes" 26 | 27 | # $EDITOR 28 | # 29 | # Set editor to `emacsclient`, using `--alternative-editor=''` to start up 30 | # `emacs --daemon` if it's not already running. Redirect stderr with 31 | # `2>/dev/null` to avoid excessive output when the daemon starts. 32 | # 33 | # NOTE: Disable until wrapping works with Fill Column Indicator enabled. 34 | # export EDITOR="emacsclient -q --alternate-editor='' 2>/dev/null" 35 | -------------------------------------------------------------------------------- /home/.tigrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Configuration file for tig 3 | # 4 | # Tig is an ncurses-based text-mode interface for git. 5 | # 6 | # http://jonas.nitro.dk/tig/ 7 | # https://github.com/jonas/tig 8 | # http://jonas.nitro.dk/tig/tigrc.5.html 9 | # 10 | # NOTE: via the tig documentation: 11 | # > Alternatively to using ~/.tigrc, Tig options can be set by putting them in 12 | # > one of the Git configuration files, which are read by Tig on startup. See 13 | # > git-config(1) for which files to use. The following example show the basic 14 | # > syntax to use for settings, bindings and colors. 15 | # > ``` 16 | # > [tig] show-changes = true 17 | # > [tig "color"] cursor = yellow red bold 18 | # > [tig "bind"] generic = P parent 19 | # > ``` 20 | ############################################################################### 21 | 22 | # enable mouse support 23 | set mouse = true 24 | 25 | # Main view column settings. 26 | set main-view = line-number:yes,interval=5 \ 27 | id:yes \ 28 | date:default \ 29 | author:full \ 30 | commit-title:yes,graph,refs,overflow=no 31 | -------------------------------------------------------------------------------- /bin/colors.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This file echoes a bunch of color codes to the 4 | # terminal to demonstrate what's available. Each 5 | # line is the color code of one forground color, 6 | # out of 17 (default + 16 escapes), followed by a 7 | # test use of that color on all nine background 8 | # colors (default + 8 escapes). 9 | # 10 | # Author: Giles Orr 11 | # URL: http://gilesorr.com/bashprompt/howto/c350.html 12 | # License: GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; 13 | # http://gilesorr.com/bashprompt/howto/a1004.html 14 | 15 | 16 | T='gYw' # The test text 17 | 18 | echo -e "\n 40m 41m 42m 43m\ 19 | 44m 45m 46m 47m"; 20 | 21 | for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ 22 | '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ 23 | ' 36m' '1;36m' ' 37m' '1;37m'; 24 | do FG=${FGs// /} 25 | echo -en " $FGs \033[$FG $T " 26 | for BG in 40m 41m 42m 43m 44m 45m 46m 47m; 27 | do echo -en "$EINS \033[$FG\033[$BG $T \033[0m"; 28 | done 29 | echo; 30 | done 31 | echo 32 | 33 | -------------------------------------------------------------------------------- /home/.shared_env.d/vvv-varying-vagrant-vagrants.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # VVV - Varying Vagrant Vagrants 3 | # 4 | # Shell settings for vvv 5 | # 6 | # https://github.com/Varying-Vagrant-Vagrants/VVV 7 | ############################################################################### 8 | 9 | 10 | # .bash_profile settings. 11 | # 12 | # Adapted from the generated .bash_profile in vagrant@vvv account. 13 | if [[ "$(hostname)" == "vvv" ]] 14 | then 15 | # Set the WP_TESTS_DIR path directory so that we can use phpunit inside 16 | # plugins almost immediately. 17 | export WP_TESTS_DIR=/srv/www/wordpress-develop/tests/phpunit/ 18 | # Set the WP_CORE_DIR path so phpunit tests are run against WP trunk 19 | export WP_CORE_DIR=/srv/www/wordpress-develop/src/ 20 | 21 | if is_bash 22 | then 23 | # add autocomplete for grunt 24 | eval "$(grunt --completion=bash)" 25 | 26 | # add autocomplete for wp-cli 27 | . /srv/www/wp-cli/utils/wp-completion.bash 28 | fi 29 | 30 | # PHPCS path 31 | export PATH="$PATH:/srv/www/phpcs/scripts/" 32 | 33 | # nvm path 34 | export NVM_DIR="/srv/config/nvm" 35 | [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm 36 | fi 37 | -------------------------------------------------------------------------------- /bin/define: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # ____ _________________ ________ 4 | # / __ \/ ____/ ____/ _/ | / / ____/ 5 | # / / / / __/ / /_ / // |/ / __/ 6 | # / /_/ / /___/ __/ _/ // /| / /___ 7 | # /_____/_____/_/ /___/_/ |_/_____/ 8 | # 9 | # Define a word using collinsdictionary.com 10 | 11 | _define() { 12 | if [[ -z "${1:-}" ]] || [[ "${1}" =~ ^-h|--help$ ]] 13 | then 14 | cat < 25 | HEREDOC 26 | return 0 27 | fi 28 | 29 | curl -s "http://www.collinsdictionary.com/dictionary/english/$*" \ 30 | | sed -n '/class="def"/p' \ 31 | | awk '{gsub(/.*|<\/span>.*/,"");print}' \ 32 | | sed "s/<[^>]\+>//g" \ 33 | | while read -r _line 34 | do 35 | if hash "w3m" &>/dev/null 36 | then 37 | printf "%s\n" "• ${_line}" | w3m -dump -T text/html 38 | else 39 | printf "%s\n" "• ${_line}" 40 | fi 41 | done 42 | } 43 | 44 | _define "$@" 45 | -------------------------------------------------------------------------------- /home/.orphans/rosetta.bash: -------------------------------------------------------------------------------- 1 | desc "rosetta:up" <> Uninstalling rosetta\n" 40 | local tmp_location="/tmp/orphans/rosetta" 41 | if [[ -n "$(pip show rosetta)" ]] 42 | then 43 | pip uninstall rosetta -y 44 | fi 45 | [[ -e "$tmp_location" ]] && _remove "$tmp_location" 46 | } 47 | -------------------------------------------------------------------------------- /home/.bash_profile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # .bash_profile 4 | # 5 | # More info about OS X shell startup: 6 | # http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup 7 | # 8 | # See also: http://wp.me/p1JkE-6S (shreevatsa.wordpress.com) 9 | ############################################################################### 10 | 11 | ############################################################################### 12 | # Verbose Init 13 | ############################################################################### 14 | 15 | . "$HOME/.shared_verbose_init" 16 | __verbose_init printf "Loading .bash_profile\n" 17 | 18 | ############################################################################### 19 | # Source .bashrc 20 | ############################################################################### 21 | 22 | # .bashrc is the preferred loaction for basic bash configuration commands, but 23 | # this file is loaded for login sessions on some systems. Sourcing .bashrc 24 | # here ensures that the settings are the same in both places. 25 | # 26 | # .profile is sourced in .bashrc, and will in turn be sourced here. 27 | if [[ -f "$HOME/.bashrc" ]] 28 | then 29 | source "$HOME/.bashrc" 30 | fi 31 | -------------------------------------------------------------------------------- /home/.orphans/neovim_dot_app.bash: -------------------------------------------------------------------------------- 1 | desc "neovim_dot_app:up" <> Installing neovim-dot-app\n" 19 | 20 | local tmp_repo=/tmp/orphans/neovim-dot-app 21 | local remote_url=https://github.com/rogual/neovim-dot-app.git 22 | 23 | git clone "$remote_url" "$tmp_repo" && 24 | cd "$tmp_repo" && 25 | make && 26 | mv "${tmp_repo}/build/NeoVim.app" "$install_location" && 27 | _remove "$tmp_repo" 28 | } 29 | 30 | desc "neovim_dot_app:down" <> Uninstalling neovim-dot-app\n" 39 | local install_location="$HOME/Applications/NeoVim.app" 40 | local tmp_location="/tmp/orphans/neovim-dot-app" 41 | [[ -e "$install_location" ]] && _remove "$install_location" 42 | [[ -e "$tmp_location" ]] && _remove "$tmp_location" 43 | } 44 | -------------------------------------------------------------------------------- /bin/ccal: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # __ 4 | # ______________ _/ / 5 | # / ___/ ___/ __ `/ / 6 | # / /__/ /__/ /_/ / / 7 | # \___/\___/\__,_/_/ 8 | # 9 | # 10 | # ccal.sh - (C) Luke Th. Bullock Fri Jun 25 13:33:30 CEST 2004 11 | # Highlight current day in cal - alot smaller than gcal ;) 12 | # 13 | # Mon Jun 28 11:24:55 CEST 2004: 14 | # bugfix: replaced _TODAY string (was: date|awk '{print $3}') due to LOCALE 15 | # 16 | # Fri Jan 9 2015: 17 | # Refactor/bugfix: quote variables, using $(..) instead of deprecated `..`, 18 | # replacing echo with more portable printf, using more portable shebang, 19 | # adding mini-help. 20 | 21 | _ccal() { 22 | if cal -h > /dev/null 2>&1 23 | then # already highlights by default 24 | cal 25 | else # need to add highlighting 26 | _TODAY=$(date +%e) 27 | _B=$(tput smso) 28 | _N=$(tput rmso) 29 | cal | sed s/"$_TODAY"/"$_B""$_TODAY""$_N"/ 30 | fi 31 | } 32 | 33 | usage="\ 34 | __ 35 | ______________ _/ / 36 | / ___/ ___/ __ \`/ / 37 | / /__/ /__/ /_/ / / 38 | \\___/\\___/\\__,_/_/ 39 | 40 | Highlight current day in cal - alot smaller than gcal ;) 41 | $(_ccal) 42 | " 43 | if [ "$1" = "-h" ] 44 | then 45 | printf "%s\n" "$usage" 46 | exit 0 47 | fi 48 | 49 | _ccal 50 | -------------------------------------------------------------------------------- /bin/git-find-large-objects: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #set -x 3 | 4 | # Shows you the largest objects in your repo's pack file. 5 | # Written for osx. 6 | # 7 | # @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ 8 | # @author Antony Stubbs 9 | 10 | # set the internal field spereator to line break, so that we can iterate easily over the verify-pack output 11 | IFS=$'\n'; 12 | 13 | # list all objects including their size, sort by size, take top 10 14 | objects=`git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head` 15 | 16 | echo "All sizes are in kB's. The pack column is the size of the object, compressed, inside the pack file." 17 | 18 | output="size,pack,SHA,location" 19 | for y in $objects 20 | do 21 | # extract the size in bytes 22 | size=$((`echo $y | cut -f 5 -d ' '`/1024)) 23 | # extract the compressed size in bytes 24 | compressedSize=$((`echo $y | cut -f 6 -d ' '`/1024)) 25 | # extract the SHA 26 | sha=`echo $y | cut -f 1 -d ' '` 27 | # find the objects location in the repository tree 28 | other=`git rev-list --all --objects | grep $sha` 29 | #lineBreak=`echo -e "\n"` 30 | output="${output}\n${size},${compressedSize},${other}" 31 | done 32 | 33 | echo -e $output | column -t -s ', ' 34 | -------------------------------------------------------------------------------- /bin/manh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ "$1" == "-h" || "$1" == "--help" ]]; then cat </dev/null; then 19 | echo 'man2html must be installed for this program to work.' 20 | exit 1 21 | fi 22 | 23 | if [ ! "$1" ]; then 24 | echo 'What manual page do you want?!' 25 | exit 26 | fi 27 | 28 | cache_dir=$DOTFILES/caches/manh 29 | 30 | # Figure out what the filename should be. 31 | file="$cache_dir/${2:+$2.}$1.html" 32 | 33 | # Create directory if it doesn't exist. 34 | [[ -e "$cache_dir" ]] || mkdir -p "$cache_dir" 35 | 36 | # Create HTML if it doesn't exist. 37 | [[ ! -e "$file" ]] && man "$@" >/dev/null && cat > "$file" < 39 | 40 | 41 | 42 | $(man "$@" 2>/dev/null | man2html -bare -nodepage) 43 | 44 | 45 | EOF 46 | 47 | # Open HTML (if it does exist). 48 | [[ -e "$file" ]] && open "$file" 49 | -------------------------------------------------------------------------------- /bin/dg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # dg 4 | # 5 | # List all records for a given domain. 6 | # 7 | # NOTE: This relies on ANY queries, which are blocked by some DNS providers such as CloudFlare. 8 | # 9 | # via: 10 | # - http://stackoverflow.com/a/29646509 11 | # - http://stackoverflow.com/a/24563532 12 | ############################################################################### 13 | 14 | #!/bin/bash 15 | set -e; set -u 16 | COMMON_SUBDOMAINS="www mail mx a.mx smtp pop imap blog en ftp ssh login" 17 | EXTENDED="" 18 | 19 | while :; do case "$1" in 20 | --) shift; break ;; 21 | -x) EXTENDED=y; shift ;; 22 | -s) NS="$2"; shift 2 ;; 23 | *) break ;; 24 | esac; done 25 | DOM="$1"; shift 26 | TYPE="${1:-any}" 27 | 28 | test "${NS:-}" || NS=$(dig +short SOA "$DOM" | awk '{print $1}') 29 | test "$NS" && NS="@$NS" 30 | 31 | if test "$EXTENDED"; then 32 | dig +nocmd $NS "$DOM" +noall +answer "$TYPE" 33 | wild_ips=$(dig +short "$NS" "*.$DOM" "$TYPE" | tr '\n' '|') 34 | wild_ips="${wild_ips%|}" 35 | for sub in $COMMON_SUBDOMAINS; do 36 | dig +nocmd $NS "$sub.$DOM" +noall +answer "$TYPE" 37 | done | cat #grep -vE "${wild_ips}" 38 | dig +nocmd $NS "*.$DOM" +noall +answer "$TYPE" 39 | else 40 | dig +nocmd $NS "$DOM" +noall +answer "$TYPE" 41 | fi 42 | -------------------------------------------------------------------------------- /home/.shared_env.d/vagrant.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Vagrant 3 | # 4 | # Vagrant is a tool for building and distributing development environments. 5 | # 6 | # https://www.vagrantup.com/ 7 | # https://github.com/hashicorp/vagrant 8 | ############################################################################### 9 | 10 | # VAGRANT_DISABLE_VBOXSYMLINKCREATE 11 | # 12 | # via warning displayed during `vagrant up`: 13 | # ----------------------------------------------------------------------------- 14 | # Vagrant is currently configured to create VirtualBox synced folders with 15 | # the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant 16 | # guest is not trusted, you may want to disable this option. For more 17 | # information on this option, please refer to the VirtualBox manual: 18 | # 19 | # https://www.virtualbox.org/manual/ch04.html#sharedfolders 20 | # 21 | # This option can be disabled globally with an environment variable: 22 | # 23 | # VAGRANT_DISABLE_VBOXSYMLINKCREATE=1 24 | # 25 | # or on a per folder basis within the Vagrantfile: 26 | # 27 | # config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false 28 | # ----------------------------------------------------------------------------- 29 | VAGRANT_DISABLE_VBOXSYMLINKCREATE=1 30 | -------------------------------------------------------------------------------- /home/.cabal/generate_config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Bash 'Strict Mode' 4 | # https://github.com/alphabetum/bash-boilerplate#bash-strict-mode 5 | set -o nounset 6 | set -o errexit 7 | set -o pipefail 8 | IFS="$(printf '\n\t')" 9 | 10 | ############################################################################### 11 | # Update Config File 12 | ############################################################################### 13 | 14 | # The cabal configuration file is included as a template since the $HOME 15 | # path has to be absolute path and, therefore, ends up containing 16 | # user-specific information. 17 | # 18 | # This function takes the template file and replaces any instances of the 19 | # string {{HOME}} with the value of the $HOME environment variable. 20 | _update_cabal_config_from_template() { 21 | local _cabal_dir="${HOME}/.cabal" 22 | 23 | # if the template file exists 24 | if [[ -f "${_cabal_dir}/config.template" ]] 25 | then 26 | # Remove current if present 27 | if [[ -f "${_cabal_dir}/config" ]] 28 | then 29 | rm "${_cabal_dir}/config" 30 | fi 31 | # copy the template to the original file's location 32 | cp "${_cabal_dir}/config.template" "${_cabal_dir}/config" 33 | # Replace {{HOME}} with value of $HOME 34 | sed -i '' "s|{{HOME}}|$HOME|g" "${_cabal_dir}/config" 35 | fi 36 | } 37 | 38 | _update_cabal_config_from_template 39 | -------------------------------------------------------------------------------- /home/.shared_rc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | ############################################################################### 3 | # .shared_rc 4 | # 5 | # This file is sourced by both .zshrc and .bashrc and is used to set common 6 | # rc settings for both shells. 7 | # 8 | # More info about OS X shell startup: 9 | # http://hayne.net/MacDev/Notes/unixFAQ.html#shellStartup 10 | ############################################################################### 11 | 12 | ############################################################################### 13 | # Verbose Init 14 | ############################################################################### 15 | 16 | . "$HOME/.shared_verbose_init" 17 | __verbose_init printf "Loading .shared_rc\n" 18 | 19 | ############################################################################### 20 | # .shared_rc.d 21 | ############################################################################### 22 | 23 | # Source all files in ".shared_rc.d" if it's present. 24 | if [ -d "$HOME/.shared_rc.d" ] 25 | then 26 | source_dir "$HOME/.shared_rc.d" 27 | fi 28 | 29 | ############################################################################### 30 | # Local config 31 | ############################################################################### 32 | 33 | # load .shared_rc.local if it exists 34 | if [ -f "$HOME/.shared_rc.local" ] 35 | then 36 | . "$HOME/.shared_rc.local" 37 | fi 38 | -------------------------------------------------------------------------------- /bin/explain: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # Explain 4 | # 5 | # Explaining Shell Commands in the Shell using a web API at mankier.com. 6 | # 7 | # https://www.mankier.com 8 | # 9 | # via: 10 | # - https://www.mankier.com/blog/explaining-shell-commands-in-the-shell.html 11 | # - https://news.ycombinator.com/item?id=9910265 12 | # 13 | # Notes from original: 14 | # 15 | # Update 26-03-2015. If using this command gives no output, see if running a simple fetch causes this error: 16 | # $ curl https://www.mankier.com 17 | # curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s). 18 | # If so, try specifying a cipher in the curl commands: curl --ciphers ecdhe_ecdsa_aes_128_sha 19 | ############################################################################### 20 | _explain () { 21 | if [ "$#" -eq 0 ]; then 22 | while read -p "Command: " cmd; do 23 | curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd" 24 | done 25 | echo "Bye!" 26 | elif [ "$#" -eq 1 ]; then 27 | curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$1" 28 | else 29 | echo "Usage" 30 | echo "explain interactive mode." 31 | echo "explain 'cmd -o | ...' one quoted command to explain it." 32 | fi 33 | } 34 | 35 | _explain "$@" 36 | -------------------------------------------------------------------------------- /home/.gitignore_global: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .gitignore_global 3 | # 4 | # Global ignore configuration for git 5 | # 6 | # http://git-scm.com/docs/gitignore 7 | # https://help.github.com/articles/ignoring-files/ 8 | # https://gist.github.com/octocat/9257657 9 | ############################################################################### 10 | 11 | # Compiled Files 12 | ############################################################################### 13 | *.class 14 | *.dll 15 | *.exe 16 | *.o 17 | *.so 18 | *.pyc 19 | 20 | # Packages / Compressed Files 21 | # 22 | # It's better to unpack these files and commit the raw source 23 | # git has its own built in compression methods 24 | ############################################################################### 25 | *.7z 26 | *.dmg 27 | *.gz 28 | *.iso 29 | *.jar 30 | *.rar 31 | *.tar 32 | *.zip 33 | 34 | # Logs and databases 35 | ############################################################################### 36 | *.log 37 | *.sql 38 | *.sqlite 39 | 40 | # OS generated files 41 | ############################################################################### 42 | 43 | # Folder view configuration files 44 | .DS_Store 45 | .DS_Store? 46 | Desktop.ini 47 | 48 | # Thumbnail cache files 49 | ._* 50 | Thumbs.db 51 | ehthumbs.db 52 | 53 | # Files that might appear on external disks 54 | .Spotlight-V100 55 | .Trashes 56 | -------------------------------------------------------------------------------- /bin/i: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ######################################################################### 3 | # i - a bask script 4 | # 5 | # Add this script and bask to your $PATH. For usage information, run: 6 | # i help 7 | ######################################################################### 8 | 9 | source "$(which bask)" 10 | 11 | desc "HELP_HEADER" < /dev/null 26 | then 27 | # Don't enable rbenv on Ubuntu, since RVM is currently preferred there. 28 | if [[ ! "$(uname -a)" =~ Ubuntu ]] 29 | then 30 | eval "$(rbenv init -)" 31 | fi 32 | fi 33 | } 34 | 35 | export __RBENV_ENABLED=0 36 | 37 | gem() { 38 | unset -f gem 39 | __enable_rbenv 40 | __RBENV_ENABLED=1 41 | gem "$@" 42 | } 43 | 44 | irb() { 45 | unset -f irb 46 | __enable_rbenv 47 | __RBENV_ENABLED=1 48 | irb "$@" 49 | } 50 | 51 | rbenv() { 52 | unset -f rbenv 53 | __enable_rbenv 54 | __RBENV_ENABLED=1 55 | rbenv "$@" 56 | } 57 | 58 | ruby() { 59 | unset -f ruby 60 | __enable_rbenv 61 | __RBENV_ENABLED=1 62 | ruby "$@" 63 | } 64 | -------------------------------------------------------------------------------- /script/install/clib-packages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # clib-packages 4 | # 5 | # Install various clib packages 6 | # 7 | # https://github.com/clibs/clib 8 | ############################################################################### 9 | 10 | # bpkg 11 | # 12 | # bpkg is a bash package manager 13 | # 14 | # JavaScript has npm, Ruby has Gems, Python has pip and now Shell has bpkg! 15 | # 16 | # bpkg is a lightweight bash package manager. It takes care of fetching the 17 | # shell scripts, installing them appropriately, setting the execution 18 | # permission and more. 19 | # 20 | # http://www.bpkg.io/ 21 | # https://github.com/bpkg/bpkg 22 | clib install bpkg/bpkg 23 | 24 | # mon(1) - Simple single-process process monitoring program written in C 25 | # 26 | # Super-simple monitoring program. 27 | # 28 | # mon spawned from the needlessly complex frustration that tools like monit 29 | # provide, with their awkward DSLs and setup. mon is written in C, uses less 30 | # than 400kb of memory, and is incredibly simple to set up. 31 | # 32 | # https://github.com/tj/mon 33 | clib install visionmedia/mon 34 | 35 | # Watch 36 | # 37 | # A tiny C program used to periodically execute a command. 38 | # 39 | # watch(1) periodically executes the given command - useful for auto-testing, 40 | # auto-building, auto-anything 41 | # 42 | # https://github.com/tj/watch 43 | clib install visionmedia/watch 44 | -------------------------------------------------------------------------------- /home/.ammonite/predef.scala: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // .ammonite/predef.scala 3 | // 4 | // Configuration file which will be executed the first thing when the Ammonite 5 | // REPL is loaded 6 | // 7 | // Ammonite is a cleanroom re-implementation of the Scala REPL from first 8 | // principles. It is much more featureful than the default REPL and comes with 9 | // a lot of ergonomic improvements and configurability that may be familiar to 10 | // people coming from IDEs or other REPLs such as IPython or Zsh. It can be 11 | // combined with Ammonite-Ops to replace Bash as your systems shell, but also 12 | // can be used alone as a superior version of the default Scala REPL, or as a 13 | // debugging tool. 14 | // 15 | // Ammonite-Ops is a library to make common filesystem operations in Scala as 16 | // concise and easy-to-use as from the Bash shell, while being robust enough to 17 | // use in large applications without getting messy. It lives in the same repo 18 | // as the Ammonite REPL, but can easily be used stand-alone in a normal 19 | // SBT/maven project. 20 | // 21 | // http://lihaoyi.github.io/Ammonite/ 22 | // https://github.com/lihaoyi/ammonite 23 | // http://tinyurl.com/beyondbash 24 | // https://news.ycombinator.com/item?id=10068058 25 | /////////////////////////////////////////////////////////////////////////////// 26 | 27 | 28 | // import Ammonite-Ops for all global REPL instances. 29 | import ammonite.ops._ 30 | -------------------------------------------------------------------------------- /script/install/heroku-plugins: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # heroku-plugins 4 | # 5 | # Heroku plugins allow developers to extend the functionality of the Heroku 6 | # command interface, adding commands or features. 7 | # 8 | # Heroku Plugin Documentation: 9 | # 10 | # https://devcenter.heroku.com/articles/using-cli-plugins 11 | ############################################################################### 12 | 13 | # heroku-docker 14 | # 15 | # Develop with Docker. Deploy to Heroku. 16 | # 17 | # https://github.com/heroku/heroku-docker 18 | # https://devcenter.heroku.com/articles/introduction-local-development-with-docker?preview=1 19 | # https://devcenter.heroku.com/articles/getting-started-with-node-js-and-heroku-local-docker-dev?preview=1 20 | # https://devcenter.heroku.com/articles/getting-started-with-ruby-and-heroku-local-docker-dev?preview=1 21 | heroku plugins:install heroku-docker 22 | 23 | # heroku-pg-transfer 24 | # 25 | # Transfer Heroku Postgres databases 26 | # 27 | # https://github.com/ddollar/heroku-pg-transfer 28 | # http://www.higherorderheroku.com/articles/pgtransfer-is-the-new-taps/ 29 | heroku plugins:install https://github.com/ddollar/heroku-pg-transfer 30 | 31 | # pg-extras 32 | # 33 | # A heroku plugin for awesome pg:* commands that are also great and fun and 34 | # super. 35 | # 36 | # https://github.com/heroku/heroku-pg-extras/ 37 | heroku plugins:install git://github.com/heroku/heroku-pg-extras.git 38 | -------------------------------------------------------------------------------- /script/install/luarocks: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # luarocks 4 | # 5 | # Install various global lua rocks. 6 | ############################################################################### 7 | 8 | ############################################################################### 9 | # Setup 10 | ############################################################################### 11 | 12 | # Alias the luarocks command to the luarocks-5.2 executable. 13 | # 14 | # Homebrew-installed lua includes luarocks with an executable name that 15 | # includes the version. In order to make a simpler `luarocks` command 16 | # available, alias luarocks to the current executable. 17 | # 18 | # More background information here: 19 | # https://github.com/Homebrew/homebrew/pull/37842 20 | alias luarocks="luarocks-5.2" 21 | 22 | ############################################################################### 23 | # Install 24 | ############################################################################### 25 | 26 | # Mjolnir 27 | # 28 | # Lightweight automation and productivity app for OS X. Mjolnir is an OS X app 29 | # that lets you automate common tasks using the language Lua. At its core, it 30 | # doesn't actually do anything besides load up a Lua environment; the real 31 | # power lies in all the useful modules that you can install. 32 | # 33 | # https://github.com/sdegutis/mjolnir 34 | luarocks install mjolnir.hotkey 35 | luarocks install mjolnir.application 36 | -------------------------------------------------------------------------------- /home/.shared_rc.d/cd.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # cd.sh 3 | # 4 | # Shortcuts for `cd` navigation. 5 | ############################################################################### 6 | 7 | # cde() 8 | # 9 | # Usage: 10 | # cde 11 | # 12 | # Description: 13 | # Change to the given directory and run `exa`. If `exa` is not installed, 14 | # then fall back to `ls`. 15 | cde() { 16 | cd "${1:-}" || return 17 | if hash "exa" 2>/dev/null 18 | then # `exa` is installed 19 | exa -la --git 20 | else 21 | ls -lah 22 | fi 23 | } 24 | 25 | # cdf() 26 | # 27 | # Usage: 28 | # cdf 29 | # 30 | # Description: 31 | # Change working directory to the top-most Finder window location. `cdf` is 32 | # short for 'cdfinder'. 33 | # 34 | # NOTE: macOS only, so only define the function if `osascript` is available. 35 | if hash osascript 2>/dev/null 36 | then 37 | cdf() { 38 | local _script 39 | _script='tell app "Finder" to POSIX path of (insertion location as alias)' 40 | cd "$(osascript -e "${_script}")" || return 41 | } 42 | fi 43 | 44 | # cdl() 45 | # 46 | # Usage: 47 | # cdl 48 | # 49 | # Description: 50 | # Change to the given directory and run `ls`. 51 | cdl() { 52 | cd "${1:-}" || return 53 | ls -lah 54 | } 55 | 56 | # mkd() 57 | # 58 | # Usage: 59 | # mkd 60 | # 61 | # Description: 62 | # Create a new directory with `mkdir -p` and enter it. 63 | mkd() { 64 | mkdir -p "$@" && cd "$_" || return 65 | } 66 | -------------------------------------------------------------------------------- /home/.bashenv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # .bashenv 4 | # 5 | # config for non-interactive and interactive instances. 6 | # 7 | # Though not used directly by bash, this is configured in order to provide a 8 | # structure that mirrors zsh. 9 | # 10 | # .bashrc loads this before loading anything else 11 | ############################################################################### 12 | 13 | ############################################################################### 14 | # Verbose Init 15 | ############################################################################### 16 | 17 | . "$HOME/.shared_verbose_init" 18 | __verbose_init printf "Loading .bashenv\n" 19 | 20 | ############################################################################### 21 | # .shared_env 22 | ############################################################################### 23 | 24 | # Load environment if it hasn't been already. 25 | if [[ ! $SHARED_ENV_LOADED == true ]] 26 | then 27 | source "$HOME/.shared_env" 28 | fi 29 | 30 | ############################################################################### 31 | # Local config 32 | ############################################################################### 33 | 34 | # Load .bashenv.local if it's present. 35 | if [[ -f "$HOME/.bashenv.local" ]] 36 | then 37 | source "$HOME/.bashenv.local" 38 | fi 39 | 40 | 41 | # NOTE: any config that can be shared with other shells should be added to 42 | # .shared_env or .shared_env.d 43 | -------------------------------------------------------------------------------- /home/.orphans/bish.bash: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/.hyperlocal" 2 | desc "bish:up" <> Uninstalling bish\n" 46 | # Remove bish if installed in old location. 47 | # TODO: remove this line. 48 | [[ -e "$HOME/bin/bish" ]] && _remove "$HOME/bin/bish" 49 | 50 | [[ -e "$PREFIX/bin/bish" ]] && _remove "$PREFIX/bin/bish" 51 | [[ -e "/tmp/orphans/bish" ]] && _remove "/tmp/orphans/bish" 52 | 53 | } 54 | -------------------------------------------------------------------------------- /bin/unicode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ######################################################################### 3 | # unicode - a bask extension script 4 | # 5 | # Add this script and bask to your $PATH. For usage information, run: 6 | # unicode help 7 | ######################################################################### 8 | 9 | source "$(which bask)" 10 | 11 | desc escape < 14 | 15 | Description: 16 | UTF-8-encode a Unicode character. 17 | EOM 18 | escape() { 19 | printf "\\\x%s" "$(printf "%s" "$@" | xxd -p -c1 -u)" 20 | # print a newline unless we’re piping the output to another program 21 | if [[ -t 1 ]] 22 | then 23 | printf "\n" 24 | fi 25 | } 26 | 27 | desc unidecode < 30 | 31 | Description: 32 | Decode \x{ABCD}-style Unicode escape sequences. 33 | EOM 34 | unidecode() { 35 | perl -e "binmode(STDOUT, ':utf8'); print \"$*\"" 36 | # print a newline unless we’re piping the output to another program 37 | if [[ -t 1 ]] 38 | then 39 | printf "\n" 40 | fi 41 | } 42 | 43 | desc codepoint < 46 | 47 | Description: 48 | Get a character’s Unicode code point. 49 | EOM 50 | codepoint() { 51 | _character="$*" 52 | if [[ "${_character}" == "$" ]] 53 | then 54 | _character="\\$" 55 | fi 56 | perl -e "use utf8; print sprintf('U+%04X', ord(\"${_character}\"))" 57 | # print a newline unless we’re piping the output to another program 58 | if [[ -t 1 ]] 59 | then 60 | printf "\n" 61 | fi 62 | } 63 | 64 | _main 65 | -------------------------------------------------------------------------------- /home/.orphans/multirust.bash: -------------------------------------------------------------------------------- 1 | _MULTIRUST_PREFIX="$HOME/.hyperlocal" 2 | _MULTIRUST_TMP_PATH="/tmp/orphans/multirust" 3 | 4 | desc "multirust:up" <> Installing multirust\n" 29 | 30 | git clone --recursive \ 31 | "https://github.com/brson/multirust" "${_MULTIRUST_TMP_PATH}" && 32 | cd "${_MULTIRUST_TMP_PATH}" && 33 | git submodule update --init && 34 | ./build.sh && 35 | ./install.sh --prefix="${_MULTIRUST_PREFIX}" && 36 | _remove "${_MULTIRUST_TMP_PATH}" 37 | } 38 | 39 | desc "multirust:down" <> Uninstalling multirust.\n" 48 | [[ -e "${_MULTIRUST_PREFIX}/bin/rustc" ]] && 49 | "${_MULTIRUST_PREFIX}/lib/rustlib/uninstall.sh" 50 | [[ -e "{_MULTIRUST_TMP_PATH}" ]] && _remove "${_MULTIRUST_TMP_PATH}" 51 | } 52 | -------------------------------------------------------------------------------- /home/.shared_env.d/homebrew.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .shared_env.d/homebrew.sh 3 | # 4 | # Configuration for Homebrew. 5 | # 6 | # http://brew.sh/ 7 | ############################################################################### 8 | 9 | # Analytics 10 | # 11 | # Disable homebrew analytics. 12 | # 13 | # https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md 14 | # https://news.ycombinator.com/item?id=11566720 15 | export HOMEBREW_NO_ANALYTICS=1 16 | 17 | # Caskroom location 18 | # 19 | # The default Caskroom location has moved to /usr/local/Caskroom. There are 20 | # reports of issues with some casks not working with the new location, so 21 | # set the old location as the default using the `$HOMEBREW_CASK_OPTS` 22 | # environment variable. 23 | # 24 | # NOTE: There is an open issue to remove the `--caskroom` option and 25 | # Homebrew Cask's implementation is in flux, so revisit this and update 26 | # as needed. 27 | # 28 | # Resources: 29 | # https://github.com/caskroom/homebrew-cask/blob/master/USAGE.md#options 30 | # https://github.com/caskroom/homebrew-cask/issues/21913 31 | # https://github.com/caskroom/homebrew-cask/issues/21858 32 | # 33 | # TODO: Remove this section when the Caskroom location has been moved on all 34 | # systems. 35 | if [[ -d "/opt/homebrew-cask/Caskroom" ]] 36 | then 37 | export HOMEBREW_CASK_OPTS="--caskroom=/opt/homebrew-cask/Caskroom" 38 | cat <> Installing iota\n" 27 | 28 | local binary_name="iota" 29 | local tmp_repo=/tmp/orphans/iota 30 | local remote_url=https://github.com/gchp/iota.git 31 | 32 | git clone "$remote_url" "$tmp_repo" && 33 | cd "$tmp_repo" && 34 | cargo build && 35 | [[ ! -d "$PREFIX/bin" ]] && mkdir -p "$PREFIX/bin" || true && 36 | cp "$tmp_repo/target/$binary_name" "$PREFIX/bin/" && 37 | cd "/tmp/orphans" && 38 | _remove "$tmp_repo" 39 | } 40 | 41 | desc "iota:down" <> Uninstalling iota\n" 50 | # Remove iota if installed in old location. 51 | # TODO: remove this line. 52 | [[ -e "$HOME/bin/iota" ]] && _remove "$HOME/bin/iota" 53 | 54 | [[ -e "$PREFIX/bin/iota" ]] && _remove "$PREFIX/bin/iota" 55 | [[ -e "/tmp/orphans/iota" ]] && _remove "/tmp/orphans/iota" 56 | } 57 | -------------------------------------------------------------------------------- /home/.orphans/xsv.bash: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/.hyperlocal" 2 | 3 | desc "xsv:up" <> Installing xsv\n" 31 | 32 | local binary_name="xsv" 33 | local tmp_repo=/tmp/orphans/xsv 34 | local remote_url=https://github.com/BurntSushi/xsv.git 35 | 36 | git clone "$remote_url" "$tmp_repo" && 37 | cd "$tmp_repo" && 38 | cargo build && 39 | cp "$tmp_repo/target/$binary_name" "$PREFIX/bin" && 40 | cd "/tmp/orphans" && 41 | _remove "$tmp_repo" 42 | } 43 | 44 | desc "xsv:down" <> Uninstalling xsv\n" 53 | # Remove xsc if installed in old location. 54 | # TODO: remove this line. 55 | [[ -e "$HOME/bin/xsv" ]] && _remove "$HOME/bin/xsv" 56 | 57 | [[ -e "$PREFIX/bin/xsv" ]] && _remove "$PREFIX/bin/xsv" 58 | [[ -e "/tmp/orphans/xsv" ]] && _remove "/tmp/orphans/xsv" 59 | } 60 | -------------------------------------------------------------------------------- /script/bootstrap/osx: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # Bootstrap dotfiles on a fresh OS X install 4 | ############################################################################### 5 | 6 | ############################################################################### 7 | # Platform Check 8 | ############################################################################### 9 | 10 | # Skip unless OS X 11 | if [[ ! "${OSTYPE}" =~ ^darwin ]] 12 | then 13 | printf "OS X bootstrapping is only supported on OS X\nSkipping...\n" 14 | exit 0 15 | fi 16 | 17 | ############################################################################### 18 | # Bootstrap 19 | ############################################################################### 20 | 21 | if [[ ! -e "${HOME}/bin" ]] 22 | then 23 | mkdir "${HOME}/bin" 24 | fi 25 | 26 | export BINDLEPATH="${HOME}/.dotfiles" && \ 27 | cd "${BINDLEPATH}" && \ 28 | git submodule init && \ 29 | git submodule update --init --recursive 30 | 31 | # Finalize Janus setup. 32 | if hash "rake" 2>/dev/null 33 | then 34 | cd "${BINDLEPATH}/home/.vim/" 35 | rake || _die printf "Janus bootstrap failed." 36 | cd "${BINDLEPATH}" 37 | else 38 | printf "rake not installed. Janus not completely initialized." 39 | fi 40 | 41 | printf "\ 42 | All done! 43 | 44 | The configuration has been initialized at the following location: 45 | 46 | ~/.dotfiles 47 | 48 | So far, your existing configuration has not been changed. Use the \`bindle\` 49 | tool to experiment with linking files into your environment. \`bindle\` 50 | commands can be discovered by running \`bindle help\`. 51 | " 52 | -------------------------------------------------------------------------------- /bin/hosts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # hosts 4 | # 5 | # A wrapper for the hosts program that includes some additional functions. 6 | ############################################################################### 7 | 8 | # desc "block" < 11 | 12 | # Description: 13 | # Block a given hostname by adding new entries assigning it to 127.0.0.1 for 14 | # IPv4 and fe80::1%lo0 for IPv6. 15 | # EOM 16 | block() { 17 | if [[ -z "${1}" ]] 18 | then 19 | printf "Usage: %s block \n" "${_ME}" 20 | exit 1 21 | fi 22 | 23 | sudo $_ME add 127.0.0.1 "${1}" 24 | # block IPv6 25 | sudo $_ME add "fe80::1%lo0" "${1}" 26 | } 27 | 28 | # desc "unblock" < 31 | 32 | # Description: 33 | # Unblock a given hostname by removing its entry from the hosts file. 34 | # EOM 35 | unblock() { 36 | if [[ -z "${1}" ]] 37 | then 38 | printf "Usage: %s unblock \n" "${_ME}" 39 | exit 1 40 | fi 41 | 42 | sudo $_ME remove 127.0.0.1 "${1}" --force 43 | # unblock IPv6 44 | sudo $_ME remove "fe80::1%lo0" "${1}" --force 45 | } 46 | 47 | # desc "search" < 50 | # 51 | # Description: 52 | # Search entries for . This is just an alias for \`$_ME list\`. 53 | # EOM 54 | search() { 55 | if _blank "${_COMMAND_ARGV[1]:-}" 56 | then 57 | $_ME help "search" 58 | return 1 59 | fi 60 | list "$@" 61 | } 62 | 63 | # Source the original hosts program. 64 | . "${HOME}/.dotfiles/vendor/com/github/alphabetum/hosts/hosts" 65 | -------------------------------------------------------------------------------- /home/.bashrc.d/ls.bash: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # ls 3 | ############################################################################### 4 | 5 | # Detect which `ls` flavor is in use 6 | if ls --color > /dev/null 2>&1 7 | then # GNU `ls` 8 | colorflag="--color" 9 | else # OS X `ls` 10 | colorflag="-G" 11 | fi 12 | 13 | # List all files colorized in long format 14 | alias l="ls -lF ${colorflag}" 15 | 16 | # List all files colorized in long format, including dot files 17 | alias la="ls -laF ${colorflag}" 18 | # Alias ll to la since ll is used on stock ubuntu installs 19 | alias ll=la 20 | 21 | # List with less 22 | alias lal='ls -laFh ${colorflag} | less -R' 23 | 24 | # List only directories 25 | alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" 26 | 27 | # Always use color output for `ls`, and include directory and alias symbols 28 | alias ls="command ls -F ${colorflag}" 29 | 30 | # $LS_COLORS 31 | # 32 | # Resources: 33 | # http://leocharre.com/articles/setting-ls_colors-colors-of-directory-listings-in-bash-terminal/ 34 | # https://github.com/trapd00r/LS_COLORS 35 | export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' 36 | -------------------------------------------------------------------------------- /script/install/brew-all: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # brew-all 4 | # 5 | # Install programs and applications using Homebrew and Homebrew Cask. 6 | ############################################################################### 7 | 8 | ############################################################################### 9 | # Platform Check 10 | ############################################################################### 11 | 12 | if [[ ! "$OSTYPE" =~ ^darwin ]] 13 | then 14 | printf "brew-all is only supported on OS X\nSkipping...\n" 15 | exit 0 16 | fi 17 | 18 | ############################################################################### 19 | # User Validation 20 | ############################################################################### 21 | 22 | __validate_user() { 23 | local _current_user 24 | _current_user="$(whoami)" 25 | local _homebrew_user 26 | _homebrew_user="$(ls -ld /usr/local/Cellar | awk '{print $3}' )" 27 | if [[ "${_current_user}" != "${_homebrew_user}" ]] 28 | then 29 | printf \ 30 | "\`brew\` must be run as the homebrew user ('%s')\nSkipping...\n" \ 31 | "${_homebrew_user}" 32 | exit 0 33 | fi 34 | } 35 | __validate_user 36 | 37 | ############################################################################### 38 | # Formulae Scripts 39 | ############################################################################### 40 | 41 | # Get the current directory path. 42 | # 43 | # This is a more explicit derivative of the following: 44 | # http://stackoverflow.com/a/246128 45 | DIR="${BASH_SOURCE%/*}" 46 | if [[ ! -d "$DIR" ]] 47 | then 48 | DIR="$PWD" 49 | fi 50 | 51 | # Source primary install scripts for Homebrew and Homewbrew Cask. 52 | . "$DIR/brew-formulae" 53 | -------------------------------------------------------------------------------- /home/.zprofile: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .zprofile 3 | # 4 | # config for non-interactive and interactive instances. Zsh loads this after 5 | # .zshenv and before .zshrc 6 | # 7 | # zsh startup sequence: 8 | # 9 | # .zshenv 10 | # >> .zprofile 11 | # .zshrc 12 | # .zlogin 13 | # .zlogout 14 | # 15 | # http://zsh.sourceforge.net/Intro/intro_3.html 16 | # http://wp.me/p1JkE-6S (shreevatsa.wordpress.com) 17 | ############################################################################### 18 | 19 | ############################################################################### 20 | # Verbose Init 21 | ############################################################################### 22 | 23 | . "${HOME}/.shared_verbose_init" 24 | __verbose_init printf "Loading .zprofile\n" 25 | 26 | ############################################################################### 27 | # .profile 28 | ############################################################################### 29 | 30 | # Load .profile if present. 31 | if [[ -f "${HOME}/.profile" ]] 32 | then 33 | source "${HOME}/.profile" 34 | fi 35 | 36 | ############################################################################### 37 | # .zprofile.d 38 | ############################################################################### 39 | 40 | # Source everything in .zprofile.d if it's present. 41 | if [[ -d "${HOME}/.zprofile.d" ]] 42 | then 43 | source_dir "${HOME}/.zprofile.d" 44 | fi 45 | 46 | ############################################################################### 47 | # Local config 48 | ############################################################################### 49 | 50 | # Load local config if present 51 | if [[ -f "${HOME}/.zprofile.local" ]] 52 | then 53 | source "${HOME}/.zprofile.local" 54 | fi 55 | -------------------------------------------------------------------------------- /home/.taskrc: -------------------------------------------------------------------------------- 1 | # [Created by task 2.5.0 12/3/2015 14:33:56] 2 | # Taskwarrior program configuration file. 3 | # For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color', 4 | # 'man task-sync' or 'man taskrc' 5 | 6 | # Here is an example of entries that use the default, override and blank values 7 | # variable=foo -- By specifying a value, this overrides the default 8 | # variable= -- By specifying no value, this means no default 9 | # #variable=foo -- By commenting out the line, or deleting it, this uses the default 10 | 11 | # Use the command 'task show' to see all defaults and overrides 12 | 13 | # Files 14 | data.location=~/.task 15 | 16 | # Color theme (uncomment one to use) 17 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/light-16.theme 18 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/light-256.theme 19 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-16.theme 20 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-256.theme 21 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-red-256.theme 22 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-green-256.theme 23 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-blue-256.theme 24 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-violets-256.theme 25 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-yellow-green.theme 26 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-gray-256.theme 27 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/dark-gray-blue-256.theme 28 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/solarized-dark-256.theme 29 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/solarized-light-256.theme 30 | #include /usr/local/Cellar/task/2.5.0/share/doc/task/rc/no-color.theme 31 | 32 | -------------------------------------------------------------------------------- /home/.wgetrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .wgetrc 3 | # 4 | # Configuration for Wget 5 | # 6 | # http://www.gnu.org/software/wget/ 7 | # http://www.gnu.org/software/wget/manual/html_node/Wgetrc-Commands.html 8 | ############################################################################### 9 | 10 | # Use the server-provided last modification date, if available 11 | timestamping = on 12 | 13 | # Do not go up in the directory structure when downloading recursively 14 | no_parent = on 15 | 16 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect 17 | # and read. (The default read timeout is 15 minutes!) 18 | timeout = 60 19 | 20 | # Retry a few times when a download fails, but don’t overdo it. 21 | # (The default is 20!) 22 | tries = 3 23 | 24 | # Retry even when the connection was refused 25 | retry_connrefused = on 26 | 27 | # Use the last component of a redirection URL for the local file name 28 | trust_server_names = on 29 | 30 | # Follow FTP links from HTML documents by default 31 | follow_ftp = on 32 | 33 | # Add a `.html` extension to `text/html` or `application/xhtml+xml` files that 34 | # lack one, or a `.css` extension to `text/css` files that lack one 35 | adjust_extension = on 36 | 37 | # Use UTF-8 as the default system encoding 38 | # Disabled as it makes `wget` builds that don’t support this feature unusable. 39 | # Does anyone know how to conditionally configure a wget setting? 40 | # http://unix.stackexchange.com/q/34730/6040 41 | #local_encoding = UTF-8 42 | 43 | # Ignore `robots.txt` and `` 44 | robots = off 45 | 46 | # Print the HTTP and FTP server responses 47 | server_response = on 48 | 49 | # Disguise as IE 9 on Windows 7 50 | user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) 51 | -------------------------------------------------------------------------------- /script/configure/macos_apps: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # macosapps 4 | # 5 | # Configure and set various preferences for non-default macOS applications, 6 | # including developer and third-party applications. 7 | ############################################################################### 8 | 9 | ############################################################################### 10 | # Platform Check 11 | ############################################################################### 12 | 13 | if [[ ! "$OSTYPE" =~ ^darwin ]] 14 | then 15 | printf "script/configure/macos_apps is only supported on macOS.\nSkipping...\n" 16 | exit 0 17 | fi 18 | 19 | ############################################################################### 20 | # Google Chrome, etc 21 | ############################################################################### 22 | 23 | # Check for updates once a week. 24 | # More information: 25 | # http://apple.stackexchange.com/a/208015 26 | # Revert command: 27 | # defaults write com.google.Keystone.Agent checkInterval 18000 28 | defaults write com.google.Keystone.Agent checkInterval 604800 29 | 30 | ############################################################################### 31 | # iTerm2 32 | ############################################################################### 33 | 34 | # Set hidden AlternateMouseScroll preference for better scrolling in command 35 | # line programs. 36 | # More information: 37 | # - https://filippo.io/native-scrolling-and-iterm2/ 38 | # - https://code.google.com/p/iterm2/issues/detail?id=2311 39 | # - http://stackoverflow.com/questions/14437979/iterm2-scroll-less-output-with-mouse 40 | # Revert command: 41 | # defaults delete com.googlecode.iterm2 AlternateMouseScroll 42 | defaults write com.googlecode.iterm2 AlternateMouseScroll -bool true 43 | -------------------------------------------------------------------------------- /home/.orphans/ammonite.bash: -------------------------------------------------------------------------------- 1 | _AMMONITE_PREFIX="${HOME}/.hyperlocal" 2 | 3 | desc "ammonite:up" <> Installing ammonite\n" 37 | 38 | cd "${_AMMONITE_PREFIX}/bin" && 39 | curl -L -o amm http://git.io/v3Xln && 40 | chmod +x amm 41 | } 42 | 43 | desc "ammonite:down" <> Uninstalling ammonite.\n" 52 | [[ -e "${_AMMONITE_PREFIX}/bin/amm" ]] && 53 | _remove "${_AMMONITE_PREFIX}/bin/amm" 54 | } 55 | 56 | -------------------------------------------------------------------------------- /bin/colors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # [..m sequences set color 3 | echo " ANSI TERMINAL COLOR TABLE " 4 | echo -e "BRIGHTER \033[30;1m black \033[31;1m red \033[32;1m green \033[33;1m yellow \033[34;1m blue \033[35;1m purple \033[36;1m cyan \033[37;1m white \033[0m" 5 | echo "" 6 | echo -e " \033[40;1m black \033[41;1m red \033[42;1m green \033[43;1m yellow \033[44;1m blue \033[45;1m purple \033[46;1m cyan \033[47;1m white \033[0m" 7 | echo "" 8 | echo -e "DIMMER \033[30;2m black \033[31;2m red \033[32;2m green \033[33;2m yellow \033[34;2m blue \033[35;2m purple \033[36;2m cyan \033[37;2m white \033[0m" 9 | echo "" 10 | echo -e " \033[40;2m black \033[41;2m red \033[42;2m green \033[43;2m yellow \033[44;2m blue \033[45;2m purple \033[46;2m cyan \033[47;2m white \033[0m" 11 | echo "" 12 | echo -e "UNDERLINE \033[30;4m black \033[31;4m red \033[32;4m green \033[33;4m yellow \033[34;4m blue \033[35;4m purple \033[36;4m cyan \033[37;4m white \033[0m" 13 | echo "" 14 | echo -e " \033[40;4m black \033[41;4m red \033[42;4m green \033[43;4m yellow \033[44;4m blue \033[45;4m purple \033[46;4m cyan \033[47;4m white \033[0m" 15 | echo "" 16 | echo -e "FLASHING \033[30;5m black \033[31;5m red \033[32;5m green \033[33;5m yellow \033[34;5m blue \033[35;5m purple \033[36;5m cyan \033[37;5m white \033[0m" 17 | echo "" 18 | echo -e " \033[40;5m black \033[41;5m red \033[42;5m green \033[43;5m yellow \033[44;5m blue \033[45;5m purple \033[46;5m cyan \033[47;5m white \033[0m" 19 | echo "" 20 | echo -e "REVERSE \033[30;7m black \033[31;7m red \033[32;7m green \033[33;7m yellow \033[34;7m blue \033[35;7m purple \033[36;7m cyan \033[37;7m white \033[0m" 21 | echo "" 22 | echo -e " \033[40;7m black \033[41;7m red \033[42;7m green \033[43;7m yellow \033[44;7m blue \033[45;7m purple \033[46;7m cyan \033[47;7m white \033[0m" 23 | -------------------------------------------------------------------------------- /home/.orphans/alcatraz.bash: -------------------------------------------------------------------------------- 1 | desc "alcatraz:up" <> Installing alcatraz\n" 26 | curl \ 27 | -fsSL \ 28 | https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh 29 | } 30 | 31 | desc "alcatraz:down" <> Uninstalling alcatraz...\n" 52 | [[ -e "$_install_location" ]] && _remove "$_install_location" 53 | 54 | if _command_argv_includes "--remove-packages" 55 | then 56 | printf ">> Removing alcatraz packages...\n" 57 | [[ -e "$_packages_path" ]] && _remove "$_packages_path" 58 | fi 59 | } 60 | -------------------------------------------------------------------------------- /home/.sackrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # @author Sampson L. Chen (sampson-chen / slchen) 4 | # @date 2012-10-14 5 | # 6 | # @description 7 | # - Configuration file for sack 8 | 9 | # The shortcut command is F, as in (F)ollow 10 | sack__shortcut_cmd=F 11 | 12 | # File to store the shortcuts so they can be used across terminal / shell sessions 13 | sack__shortcut_file=~/.sack_shortcuts 14 | 15 | # Toggle the instructions after search results; 0 for off 16 | sack__show_instructions=0 17 | 18 | # Variable(s) to remove magic values from the code 19 | sack__dev_null=/dev/null 20 | 21 | # Determine the OS 22 | sack__OS=$(uname) 23 | 24 | # @todo: add support for editors other than vim and emacs 25 | sack__default_editor=vim 26 | 27 | # # # # # # sack profiles # # # # # # 28 | # (Note: do not edit the beacon tags) 29 | # sack__beacon_tag_profiles 30 | # 31 | sack__profile_name=no_profile 32 | sack__profile_preset_flags="" 33 | sack__profile_preset_directory="" 34 | # 35 | sack__profile_name=Aamir 36 | sack__profile_preset_flags="" 37 | sack__profile_preset_directory="" 38 | # 39 | sack__profile_name=Mike 40 | sack__profile_preset_flags="" 41 | sack__profile_preset_directory="" 42 | # 43 | sack__profile_name=Tina 44 | sack__profile_preset_flags="" 45 | sack__profile_preset_directory="" 46 | # 47 | sack__profile_name=David 48 | sack__profile_preset_flags="" 49 | sack__profile_preset_directory="" 50 | # 51 | sack__profile_name=John 52 | sack__profile_preset_flags="" 53 | sack__profile_preset_directory="" 54 | # 55 | sack__profile_name=RB 56 | sack__profile_preset_flags="-i" 57 | sack__profile_preset_directory="~/src/" 58 | # 59 | # sack__beacon_tag_new_profiles 60 | 61 | # sack__beacon_tag_current_profile BEGIN 62 | # 63 | sack__profile_name=no_profile 64 | sack__profile_preset_flags="" 65 | sack__profile_preset_directory="" 66 | # 67 | # sack__beacon_tag_current_profile END 68 | 69 | # # # # # # # # # # # # # # # # # # 70 | -------------------------------------------------------------------------------- /bin/extract: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # _ _ 4 | # _____ _| |_ _ __ __ _ ___| |_ 5 | # / _ \ \/ / __| '__/ _` |/ __| __| 6 | # | __/> <| |_| | | (_| | (__| |_ 7 | # \___/_/\_\\__|_| \__,_|\___|\__| 8 | # 9 | # Easily extract all compressed file types 10 | # 11 | # Usage: 12 | # extract 13 | # 14 | # Depends on: 15 | # tar 16 | # bunzip2 17 | # unrar 18 | # gunzip 19 | # unzip 20 | # uncompress 21 | # 7z 22 | 23 | _extract() { 24 | if [[ -f "${1:-}" ]] 25 | then 26 | case "${1}" in 27 | *.tar.bz2) tar xvjf -- "${1}" ;; 28 | *.tar.gz) tar xvzf -- "${1}" ;; 29 | *.bz2) bunzip2 -- "${1}" ;; 30 | *.rar) unrar x -- "${1}" ;; 31 | *.gz) gunzip -- "${1}" ;; 32 | *.tar) tar xvf -- "${1}" ;; 33 | *.tbz2) tar xvjf -- "${1}" ;; 34 | *.tgz) tar xvzf -- "${1}" ;; 35 | *.zip) unzip -- "${1}" ;; 36 | *.Z) uncompress -- "${1}" ;; 37 | *.7z) 7z x -- "${1}" ;; 38 | *) printf "don't know how to extract '%s'...\n" "$1" ;; 39 | esac 40 | else 41 | printf "'%s' is not a valid file\n" "${1:-}" 42 | fi 43 | } 44 | 45 | if [[ -z "${1:-}" ]] || 46 | [[ "${1}" = "-h" ]] || 47 | [[ "${1}" = "--help" ]] 48 | then 49 | cat < <| |_| | | (_| | (__| |_ 54 | \\___/_/\\_\\\\__|_| \\__,_|\\___|\\__| 55 | 56 | Easily extract all compressed file types 57 | 58 | Usage: 59 | extract 60 | 61 | Supported File Extensions: 62 | .tar.bz2 63 | .tar.gz 64 | .bz2 65 | .rar 66 | .gz 67 | .tar 68 | .tbz2 69 | .tgz 70 | .zip 71 | .Z 72 | .7z 73 | HEREDOC 74 | exit 0 75 | fi 76 | 77 | _extract "$@" 78 | -------------------------------------------------------------------------------- /script/install/apt-packages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # apt-packages 4 | ############################################################################### 5 | 6 | ############################################################################### 7 | # Platform Check 8 | ############################################################################### 9 | 10 | if ! hash "apt-get" 2>/dev/null 11 | then 12 | printf "apt-packages requires APT.\nSkipping...\n" 13 | exit 0 14 | fi 15 | 16 | ############################################################################### 17 | # Update package lists 18 | ############################################################################### 19 | 20 | sudo apt-get update 21 | 22 | ############################################################################### 23 | # Package Scripts 24 | ############################################################################### 25 | 26 | # Get the current directory path. 27 | # 28 | # This is a more explicit derivative of the following: 29 | # http://stackoverflow.com/a/246128 30 | DIR="${BASH_SOURCE%/*}" 31 | if [[ ! -d "$DIR" ]] 32 | then 33 | DIR="$PWD" 34 | fi 35 | 36 | ############################################################################### 37 | # apt-packages.d 38 | # 39 | # Install lists for APT packages. 40 | ############################################################################### 41 | 42 | # Load all files in apt-packages.d if it exists. 43 | _apt_packages_d="${DIR}/apt-packages.d" 44 | if [[ -e "$_apt_packages_d" ]] 45 | then 46 | for _file in "$_apt_packages_d"/* 47 | do 48 | source "$_file" 49 | done 50 | fi 51 | 52 | ############################################################################### 53 | # Cleanup 54 | ############################################################################### 55 | 56 | sudo apt-get autoremove -y 57 | -------------------------------------------------------------------------------- /home/.inputrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .inputrc 3 | # 4 | # Readline Init File 5 | # 6 | # https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File.html 7 | ############################################################################### 8 | 9 | # Make Tab autocomplete regardless of filename case. 10 | set completion-ignore-case on 11 | 12 | # List all matches in case multiple possible completions are possible. 13 | set show-all-if-ambiguous on 14 | 15 | # Immediately add a trailing slash when autocompleting symlinks to directories. 16 | set mark-symlinked-directories on 17 | 18 | # Use the text that has already been typed as the prefix for searching through. 19 | # commands (i.e. more intelligent Up/Down behavior) 20 | "\e[B": history-search-forward 21 | "\e[A": history-search-backward 22 | 23 | # Do not autocomplete hidden files unless the pattern explicitly begins with a 24 | # dot. 25 | set match-hidden-files off 26 | 27 | # Show all autocomplete results at once 28 | set page-completions off 29 | 30 | # If there are more than 200 possible completions for a word, ask to show them 31 | # all. 32 | set completion-query-items 200 33 | 34 | # Show extra file information when completing, like `ls -F` does. 35 | set visible-stats on 36 | 37 | # Be more intelligent when autocompleting by also looking at the text after 38 | # the cursor. For example, when the current line is "cd ~/src/mozil", and 39 | # the cursor is on the "z", pressing Tab will not autocomplete it to "cd 40 | # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the 41 | # Readline used by Bash 4.) 42 | set skip-completed-text on 43 | 44 | # Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'. 45 | set input-meta on 46 | set output-meta on 47 | set convert-meta off 48 | 49 | # Use Alt/Meta + Delete to delete the preceding word. 50 | "\e[3;3~": kill-word 51 | -------------------------------------------------------------------------------- /home/.psqlrc: -------------------------------------------------------------------------------- 1 | -- .psqlrc 2 | -- 3 | -- Configuration for the PostgreSQL Shell. 4 | -- 5 | -- Resources: 6 | -- - Official docs 7 | -- http://www.postgresql.org/docs/9.3/static/app-psql.html 8 | -- - An Explained psqlrc 9 | -- https://robots.thoughtbot.com/an-explained-psqlrc 10 | -- - Improving the Command-Line Postgres Experience 11 | -- http://robots.thoughtbot.com/improving-the-command-line-postgres-experience 12 | -- - PostgreSQL on the Command Line 13 | -- http://phili.pe/posts/postgresql-on-the-command-line/ 14 | -- - comments: https://news.ycombinator.com/item?id=10458866 15 | -- - Colorizing The psql Prompt — A Guide 16 | -- http://i-dba.blogspot.com/2014/02/colorizing-psql-prompt-guide.html 17 | -- - Getting More Out of Psql (the PostgreSQL CLI) 18 | -- http://www.craigkerstiens.com/2013/02/21/more-out-of-psql/ 19 | -- - How I Work With Postgres – Psql, My PostgreSQL Admin 20 | -- http://www.craigkerstiens.com/2013/02/13/How-I-Work-With-Postgres/ 21 | 22 | -- Don't display the "helpful" message on startup. 23 | \set QUIET 1 24 | \pset null '[NULL]' 25 | 26 | -- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING 27 | \set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# ' 28 | -- PROMPT2 is printed when the prompt expects more input, like when you type 29 | -- SELECT * FROM. %R shows what type of input it expects. 30 | \set PROMPT2 '[more] %R > ' 31 | 32 | -- Show how long each query takes to execute 33 | \timing 34 | 35 | -- Use best available output format 36 | \x auto 37 | \set VERBOSITY verbose 38 | \set HISTFILE ~/.psql_history- :DBNAME 39 | \set HISTCONTROL ignoredups 40 | \set COMP_KEYWORD_CASE upper 41 | \unset QUIET 42 | 43 | -- psql can't check for a file's existence, so we'll provide an empty local 44 | -- file that users can override with their custom dotfiles. To set your own 45 | -- personal settings, place your own file in ~/.psqlrc.local 46 | -- \i ~/.psqlrc.local 47 | -------------------------------------------------------------------------------- /home/.zshenv: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .zshenv 3 | # 4 | # config for non-interactive and interactive instances. Zsh loads this before 5 | # loading .zshrc 6 | # 7 | # zsh startup sequence: 8 | # 9 | # >> .zshenv 10 | # .zprofile 11 | # .zshrc 12 | # .zlogin 13 | # .zlogout 14 | # 15 | # http://zsh.sourceforge.net/Intro/intro_3.html 16 | # http://wp.me/p1JkE-6S (shreevatsa.wordpress.com) 17 | ############################################################################### 18 | 19 | ############################################################################### 20 | # Verbose Init 21 | ############################################################################### 22 | 23 | . "${HOME}/.shared_verbose_init" 24 | __verbose_init printf "Loading .zshenv\n" 25 | 26 | ############################################################################### 27 | # .shared_env 28 | ############################################################################### 29 | 30 | # Load environment if it hasn't already been. 31 | if [[ ! "${SHARED_ENV_LOADED}" == true ]] 32 | then 33 | source "${HOME}/.shared_env" 34 | fi 35 | 36 | ############################################################################### 37 | # .zshenv.d 38 | ############################################################################### 39 | 40 | # Source everything in .zshenv.d if it's present. 41 | if [[ -d "${HOME}/.zshenv.d" ]] 42 | then 43 | source_dir "${HOME}/.zshenv.d" 44 | fi 45 | 46 | ############################################################################### 47 | # Local config 48 | ############################################################################### 49 | 50 | # load .zshenv.local if it exists 51 | if [[ -f "${HOME}/.zshenv.local" ]] 52 | then 53 | source "${HOME}/.zshenv.local" 54 | fi 55 | 56 | 57 | # NOTE: any config that can be shared with other shells should be added to 58 | # .shared_env or .shared_env.d 59 | -------------------------------------------------------------------------------- /script/customize/vscode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # vscode 4 | # 5 | # Customize the Visual Studio Code setup on macOS 6 | ############################################################################### 7 | 8 | ############################################################################### 9 | # Platform Check 10 | ############################################################################### 11 | 12 | if [[ ! "$OSTYPE" =~ ^darwin ]] 13 | then 14 | printf "vscode is only supported on macOS.\nSkipping...\n" 15 | exit 0 16 | fi 17 | 18 | ############################################################################### 19 | # Link Config 20 | ############################################################################### 21 | 22 | # link_config() 23 | # 24 | # Usage: 25 | # link_config 26 | # 27 | # Description: 28 | # Add links from the macOS preferences location to the ~/.config location. 29 | # ~/.config is used on linux systems and versioned within in this 30 | # configuration project. 31 | link_config() { 32 | local macos_prefs_path="${HOME}/Library/Application Support/Code" 33 | local config_path="${HOME}/.config/Code" 34 | 35 | if [[ ! -e "${config_path}" ]] 36 | then 37 | printf "%s not found. Skipping...\n" "${config_path}" 38 | exit 0 39 | fi 40 | 41 | if [[ -L "$macos_prefs_path" ]] 42 | then 43 | printf "%s is already a link. Skipping...\n" "${macos_prefs_path}" 44 | exit 0 45 | elif [[ ! -d "${macos_prefs_path}" ]] 46 | then 47 | printf "%s is not a directory. Skipping...\n" "${macos_prefs_path}" 48 | exit 0 49 | elif [[ -e "${macos_prefs_path}.bak" ]] 50 | then 51 | printf "%s.bak exists. Manually remove it to proceed. Skipping...\n" \ 52 | "${macos_prefs_path}" 53 | else 54 | mv "${macos_prefs_path}" "${macos_prefs_path}.bak" 55 | ln -s "${config_path}" "${macos_prefs_path}" 56 | fi 57 | } 58 | 59 | link_config 60 | -------------------------------------------------------------------------------- /script/install/bpkg-packages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # bpkg-packages 4 | # 5 | # Install various bpkg (bash package manager) packages 6 | # 7 | # http://www.bpkg.io/ 8 | # https://github.com/bpkg/bpkg 9 | ############################################################################### 10 | 11 | ############################################################################### 12 | # Setup 13 | ############################################################################### 14 | 15 | # PREFIX --------------------------------------------------------------------- 16 | 17 | # In order to keep bpkg-installed programs separated from everything else, 18 | # place installed items in ~/.bpkg/bin, which needs to be added to the $PATH. 19 | 20 | export PREFIX="$HOME/.bpkg" 21 | 22 | if [[ ! -e "$PREFIX" ]] 23 | then 24 | mkdir -p "$PREFIX" 25 | fi 26 | 27 | ############################################################################### 28 | # Packages 29 | ############################################################################### 30 | 31 | # C 32 | # 33 | # Compile and execute C "scripts" in one go! 34 | # 35 | # https://github.com/ryanmjacobs/c 36 | # https://news.ycombinator.com/item?id=9144467 37 | 38 | # https://github.com/ryanmjacobs/c 39 | bpkg install -g ryanmjacobs/c 40 | 41 | # clip 42 | # 43 | # Silly terminal clipboard 44 | # 45 | # https://github.com/bpkg/clip 46 | # http://www.bpkg.io/pkg/clip/ 47 | bpkg install -g clip 48 | 49 | # Clock 50 | # 51 | # Track your working hours on the command line. 52 | # 53 | # https://github.com/lordvlad/clock 54 | bpkg install -g lordvlad/clock 55 | 56 | # mush 57 | # 58 | # Mustache templates for bash 59 | # 60 | # https://github.com/jwerle/mush 61 | bpkg install -g jwerle/mush 62 | 63 | # osx-screencast 64 | # 65 | # Easily create a screencast on OS X in a few commands. 66 | # 67 | # https://github.com/bpkg/osx-screencast 68 | bpkg install -g osx-screencast 69 | -------------------------------------------------------------------------------- /home/.orphans/zindex.bash: -------------------------------------------------------------------------------- 1 | export PREFIX="$HOME/.hyperlocal" 2 | 3 | desc "zindex:up" <> Uninstalling zindex\n" 53 | 54 | # Remove if installed in old location. 55 | # TODO: remove these lines. 56 | [[ -e "$HOME/bin/zq" ]] && _remove "$HOME/bin/zq" 57 | [[ -e "$HOME/bin/zindex" ]] && _remove "$HOME/bin/zindex" 58 | 59 | local tmp_location="/tmp/orphans/zindex" 60 | [[ -e "$tmp_location" ]] && _remove "$tmp_location" 61 | [[ -e "$PREFIX/bin/zq" ]] && _remove "$PREFIX/bin/zq" 62 | [[ -e "$PREFIX/bin/zindex" ]] && _remove "$PREFIX/bin/zindex" 63 | } 64 | -------------------------------------------------------------------------------- /home/.shared_rc.d/hd_hexdump.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # hd_hexdump.sh 3 | ############################################################################### 4 | 5 | # hd() 6 | # 7 | # Usage: 8 | # hd [-n] 9 | # 10 | # Options: 11 | # -n Show line numbers. 12 | # 13 | # Description: 14 | # Canonical hex dump with color and `less`. 15 | # 16 | # NOTE: some popular operating systems use `hd` as a symlink to `hexdump`, 17 | # so don't define the function if `hd` already exists. 18 | if ! hash "hd" 2>/dev/null 19 | then 20 | hd() { 21 | _print_hd_help() { 22 | cat < 25 | hd -h | --help 26 | 27 | Options: 28 | -n Show line numbers. 29 | -h --help Show this help. 30 | 31 | Description: 32 | Canonical hex dump with color and \`less\`. 33 | HEREDOC 34 | } 35 | 36 | local _cat_cmd="cat" 37 | local _less_options="-FRX" 38 | local -a _hexdump_arguments 39 | 40 | # Use `ccat` to generate color if it's available. 41 | # https://github.com/jingweno/ccat 42 | # At this time, `pygmentize`, another syntax highlighter, doesn't work 43 | # well for this content. 44 | if hash "ccat" 2>/dev/null 45 | then 46 | _cat_cmd="ccat -C 'always'" 47 | fi 48 | 49 | for __arg in "${@:-}" 50 | do 51 | case "${__arg}" in 52 | -h|--help) 53 | _print_hd_help 54 | return 0 55 | ;; 56 | -n) 57 | _less_options="${_less_options}N" 58 | ;; 59 | *) 60 | _hexdump_arguments+=("${__arg}") 61 | ;; 62 | esac 63 | done 64 | 65 | if [[ -z "${_hexdump_arguments[@]:-}" ]] 66 | then # there are no arguments. 67 | _print_hd_help 68 | return 0 69 | fi 70 | 71 | hexdump \ 72 | -C \ 73 | "${_hexdump_arguments[@]}" \ 74 | | eval "${_cat_cmd}" \ 75 | | less "${_less_options}" 76 | } 77 | fi 78 | -------------------------------------------------------------------------------- /script/customize/sublime-text-3: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # sublime-text-3 4 | # 5 | # Customize the Sublime Text 3 setup on macOS 6 | ############################################################################### 7 | 8 | ############################################################################### 9 | # Platform Check 10 | ############################################################################### 11 | 12 | if [[ ! "$OSTYPE" =~ ^darwin ]] 13 | then 14 | printf "sublime-text-3 is only supported on macOS.\nSkipping...\n" 15 | exit 0 16 | fi 17 | 18 | ############################################################################### 19 | # Link Config 20 | ############################################################################### 21 | 22 | # link_config() 23 | # 24 | # Usage: 25 | # link_config 26 | # 27 | # Description: 28 | # Add links from the macOS preferences location to the ~/.config location. 29 | # ~/.config is used on linux systems and versioned within in this 30 | # configuration project. 31 | link_config() { 32 | local macos_prefs_path="${HOME}/Library/Application Support/Sublime Text 3" 33 | local config_path="${HOME}/.config/sublime-text-3" 34 | 35 | if [[ ! -e "${config_path}" ]] 36 | then 37 | printf "%s not found. Skipping...\n" "${config_path}" 38 | exit 0 39 | fi 40 | 41 | if [[ -L "$macos_prefs_path" ]] 42 | then 43 | printf "%s is already a link. Skipping...\n" "${macos_prefs_path}" 44 | exit 0 45 | elif [[ ! -d "${macos_prefs_path}" ]] 46 | then 47 | printf "%s is not a directory. Skipping...\n" "${macos_prefs_path}" 48 | exit 0 49 | elif [[ -e "${macos_prefs_path}.bak" ]] 50 | then 51 | printf "%s.bak exists. Manually remove it to proceed. Skipping...\n" \ 52 | "${macos_prefs_path}" 53 | else 54 | mv "${macos_prefs_path}" "${macos_prefs_path}.bak" 55 | ln -s "${config_path}" "${macos_prefs_path}" 56 | fi 57 | } 58 | 59 | link_config 60 | -------------------------------------------------------------------------------- /home/.shared_env.d/docker.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Docker 3 | # 4 | # Environment settings for Docker and Boot2Docker 5 | # 6 | # Docker 7 | # 8 | # Docker is an open-source project that automates the deployment of 9 | # applications inside software containers, by providing an additional layer 10 | # of abstraction and automation of operating-system-level virtualization on 11 | # Linux. Docker uses resource isolation features of the Linux kernel such 12 | # as cgroups and kernel namespaces to allow independent "containers" to run 13 | # within a single Linux instance, avoiding the overhead of starting and 14 | # maintaining virtual machines. 15 | # 16 | # Boot2Docker 17 | # 18 | # Boot2Docker is a lightweight Linux distribution made specifically to run 19 | # Docker containers. It runs completely from RAM, is a small ~24MB download 20 | # and boots in ~5s (YMMV). 21 | # 22 | # Boot2Docker is currently designed and tuned for development. Using it for 23 | # any kind of production workloads at this time is highly discouraged. 24 | # 25 | # https://www.docker.com/ 26 | # https://en.wikipedia.org/wiki/Docker_(software) 27 | # https://github.com/docker/docker 28 | # http://boot2docker.io/ 29 | # https://github.com/boot2docker/boot2docker 30 | # https://github.com/odewahn/docker-jumpstart/ 31 | ############################################################################### 32 | 33 | # Boot2Docker environment variables. 34 | # 35 | # These environment variables are the equivalent to what it output by 36 | # `boot2docker up`, but generalized to be portable between environments. 37 | 38 | # NOTE: Docker for Mac does not use these variables and they must be unset. 39 | # More information: https://docs.docker.com/docker-for-mac/docker-toolbox/ 40 | # TODO: Remove this file. 41 | # if is_macos 42 | # then 43 | # export DOCKER_HOST="tcp://$(boot2docker ip 2>/dev/null):2376" 44 | # export DOCKER_CERT_PATH="${HOME}/.boot2docker/certs/boot2docker-vm" 45 | # export DOCKER_TLS_VERIFY=1 46 | # fi 47 | -------------------------------------------------------------------------------- /home/.shared_rc.d/base16-shell.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Base16 Shell 3 | # 4 | # A shell script to change your shell's default ANSI colors but most 5 | # importantly, colors 17 to 21 of your shell's 256 colorspace (if supported by 6 | # your terminal). This script makes it possible honor the original bright 7 | # colors of your shell (e.g. bright green is still green and so on) whilst 8 | # providing the additional base16 colors to applications such as Vim. 9 | # 10 | # https://github.com/chriskempson/base16-shell 11 | ############################################################################### 12 | 13 | set_shell_theme() { 14 | BASE16_SHELL="${HOME}/.config/base16-shell/scripts/base16-${1}".sh 15 | [[ -s "${BASE16_SHELL}" ]] && source "${BASE16_SHELL}" 16 | } 17 | 18 | # Including favorites here for easier switching. 19 | 20 | #set_shell_theme "3024" 21 | #set_shell_theme "bespin" 22 | #set_shell_theme "brewer" 23 | #set_shell_theme "eighties" 24 | #set_shell_theme "google" 25 | #set_shell_theme "grayscale" 26 | #set_shell_theme "greenscreen" 27 | #set_shell_theme "isotope" # close to original 28 | #set_shell_theme "shapeshifter" # close to original 29 | #set_shell_theme "summerfruit" 30 | #set_shell_theme "tomorrow" 31 | #set_shell_theme "twilight" 32 | 33 | # Set the theme. 34 | # 35 | # Exceptions: 36 | # - There are cases where `$TERM` is not set, which can cause the theme's 37 | # commands to be printed out in a string. When `$TERM` is unset, the theme 38 | # is likely unneeded, so we can avoid setting it and triggering these 39 | # messages. 40 | # - Terminal.app doesn't support setting colors in the 256 colorspace, so 41 | # these themes do not work with it. 42 | # - There are cases where `$TERM` is set to "dumb", which should be handled 43 | # here similarly to a blank `$TERM`. 44 | if [[ "${TERM_PROGRAM}" != "Apple_Terminal" ]] && 45 | [[ -n "${TERM:-}" ]] && 46 | [[ "${TERM}" != "dumb" ]] 47 | then 48 | set_shell_theme "twilight" 49 | fi 50 | -------------------------------------------------------------------------------- /home/.irbrc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # .irbrc 3 | # 4 | # Configuration for the IRB Ruby REPL 5 | # 6 | # https://en.wikipedia.org/wiki/Interactive_Ruby_Shell 7 | # http://www.ruby-doc.org/stdlib-2.0/libdoc/irb/rdoc/IRB.html 8 | ############################################################################### 9 | 10 | # copy the argument to the OS X clipboard 11 | def copy(str) 12 | IO.popen('pbcopy', 'w') { |f| f << str.to_s } 13 | end 14 | 15 | 16 | module Kernel 17 | # Determine where a method is defined in the current environment. 18 | def where_is_this_defined(settings={}, &block) 19 | settings[:debug] ||= false 20 | settings[:educated_guess] ||= false 21 | 22 | events = [] 23 | 24 | set_trace_func lambda { |event, file, line, id, binding, classname| 25 | events << { 26 | :event => event, 27 | :file => file, 28 | :line => line, 29 | :id => id, 30 | :binding => binding, 31 | :classname => classname 32 | } 33 | 34 | if settings[:debug] 35 | puts "event => #{event}" 36 | puts "file => #{file}" 37 | puts "line => #{line}" 38 | puts "id => #{id}" 39 | puts "binding => #{binding}" 40 | puts "classname => #{classname}" 41 | puts '' 42 | end 43 | } 44 | yield 45 | set_trace_func(nil) 46 | 47 | events.each do |event| 48 | next unless event[:event] == 'call' or ( 49 | event[:event] == 'return' and event[:classname].included_modules.include?(ActiveRecord::Associations) 50 | ) 51 | return "#{event[:classname]} received message '#{event[:id]}', Line \##{event[:line]} of #{event[:file]}" 52 | end 53 | 54 | if settings[:educated_guess] and events.size > 3 55 | event = events[-3] 56 | return "#{event[:classname]} received message '#{event[:id]}', Line \##{event[:line]} of #{event[:file]}" 57 | end 58 | 59 | return 'Unable to determine where method was defined.' 60 | end 61 | end 62 | 63 | -------------------------------------------------------------------------------- /home/.shared_rc.d/macos.sh: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # A collection of shell functions for macOS only. 3 | ############################################################################### 4 | 5 | # Automator ------------------------------------------------------------------- 6 | 7 | mergepdf() { 8 | _usage="Usage: mergepdf -o output.pdf input{1,2,3}.pdf" 9 | if [ $# -eq 0 ]; then 10 | printf "%s\n" "$_usage" 11 | return 0 12 | fi 13 | case "$1" in 14 | -h|--help) 15 | printf "%s\n" "$_usage" 16 | ;; 17 | *) 18 | /System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py "$@" 19 | ;; 20 | esac 21 | } 22 | 23 | # Clipboard ------------------------------------------------------------------- 24 | 25 | # Copy the current pwd (working directory) to the clipboard. 26 | cpwd() { 27 | pwd | xargs echo -n | pbcopy 28 | } 29 | 30 | # Trim new lines and copy to clipboard 31 | clean_copy() { 32 | tr -d '\n' | pbcopy 33 | } 34 | 35 | # Finder ---------------------------------------------------------------------- 36 | 37 | # Hide/show hidden files in Finder 38 | # Recursively delete `.DS_Store` files 39 | clean_ds_store() { 40 | find . -type f -name '*.DS_Store' -ls -delete 41 | } 42 | 43 | # finder() 44 | # 45 | # Usage: 46 | # finder 47 | # 48 | # Description: 49 | # Open the given path in the finder. Alias for `open -R`. 50 | finder() { 51 | local _path="${1:-}" 52 | if [[ -z "$_path" ]] 53 | then 54 | printf "Usage: finder \n" 55 | return 1 56 | elif [[ ! -e "$_path" ]] 57 | then 58 | printf "Nothing exists at the given path:\n%s\n" "$_path" 59 | return 1 60 | else 61 | open -R "$_path" 62 | fi 63 | } 64 | 65 | # Shell ----------------------------------------------------------------------- 66 | 67 | # OS X has no `md5sum`, so use `md5` as a fallback 68 | command -v md5sum > /dev/null || alias md5sum="md5" 69 | 70 | # OS X has no `sha1sum`, so use `shasum` as a fallback 71 | command -v sha1sum > /dev/null || alias sha1sum="shasum" 72 | -------------------------------------------------------------------------------- /script/customize/macos_calendar_sounds: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ############################################################################### 3 | # macos_calendar_sounds 4 | # 5 | # Customize the event notification sounds in macOS Calendar. 6 | # 7 | # Calendar doesn't provide a way to customize notification sounds for events. 8 | # As a result, all Calendar notifications use the 'Basso' sound. In order to 9 | # use a different sound, we have to jump through some hoops. 10 | # 11 | # More information: 12 | # https://discussions.apple.com/message/23979540 13 | # http://apple.stackexchange.com/q/60017 14 | ############################################################################### 15 | 16 | ############################################################################### 17 | # Platform Check 18 | ############################################################################### 19 | 20 | if [[ ! "$OSTYPE" =~ ^darwin ]] 21 | then 22 | printf "macos_calendar_sounds is only supported on macOS.\nSkipping...\n" 23 | exit 0 24 | fi 25 | 26 | ############################################################################### 27 | # Customize Event Notification Sound 28 | ############################################################################### 29 | 30 | # TODO: Everything 31 | printf "macos_calendar_sounds not implemented.\n" && exit 0 32 | 33 | # _customize_event_notification_sound 34 | # 35 | # Usage: 36 | # _customize_event_notification_sound 37 | _customize_event_notification_sound() { 38 | local calendars=() 39 | 40 | for _item in ~/Library/Calendars/* 41 | do 42 | # TODO 43 | # Find all entries with a .calendar extension and add them to the 44 | # `$calendars` array. 45 | echo "$_item" 46 | done 47 | 48 | for _item in "${calendars[@]}" 49 | do 50 | # TODO 51 | # For each calendar, edit this file: 52 | # $calendar_path/LocalDefaultAlarms/EventAllDayAlarms.icsalarm 53 | # Replace: 54 | # ATTACH;VALUE=URI:Basso 55 | # with: 56 | # ATTACH;VALUE=URI:Tink 57 | echo "$_item" 58 | done 59 | } 60 | _customize_event_notification_sound 61 | -------------------------------------------------------------------------------- /home/.orphans/exa.bash: -------------------------------------------------------------------------------- 1 | desc "exa:up" </dev/null 39 | then 40 | printf "exa already installed.\n" && exit 0 41 | fi 42 | 43 | printf ">> Installing exa\n" 44 | 45 | mkdir -p "${tmp_location}" 46 | cd "${tmp_location}" || exit 47 | 48 | debug "curl -Ls \"${url}\" -o \"${tmp_location}/${binary_name}.zip\"" 49 | curl -Ls "${url}" -o "${tmp_location}/${binary_name}.zip" 50 | 51 | unzip "${tmp_location}/${binary_name}.zip" 52 | mv "${tmp_location}/${binary_name}" "${HOME}/bin/exa" 53 | _remove "${tmp_location}" 54 | } 55 | 56 | desc "exa:down" <> Uninstalling exa\n" 65 | [[ -e "$HOME/bin/exa" ]] && _remove "$HOME/bin/exa" 66 | [[ -e "/tmp/orphans/exa" ]] && _remove "/tmp/orphans/exa" 67 | } 68 | --------------------------------------------------------------------------------