Skip to content

Instantly share code, notes, and snippets.

@jahio
jahio / .profile
Created January 3, 2017 11:05
Some useful aliases for installing and working with NixOS
#!/usr/bin/env $SHELL
alias lsblk="lsblk -o MODEL,VENDOR,NAME,LABEL,SIZE,MOUNTPOINT,FSTYPE"
alias gramps="nix-env -p /nix/var/nix/profiles/system --list-generations"
alias nixos-rebuild="nixos-rebuild -j 6 --cores 8"
#
# -j is how many "jobs" or simultaneous computational processes run in tandem
# --cores is how many CPU cores you want to use
# How do you get these values? `cat /proc/cpuinfo` and look at the number of
# returned "CPUs". They're zero indexed, so if you get the last one as object
# number seven (7), you have 8 cores.
@jahio
jahio / settings.json
Created September 14, 2016 14:04
Visual Studio Code - User Settings Overrides
// Place your settings in this file to overwrite the default settings
{
"editor.rulers": [80, 100],
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.mouseWheelZoom": true,
"editor.fontLigatures": true,
"editor.renderIndentGuides": true,
"editor.codeLens": true,
"diffEditor.ignoreTrimWhitespace": false,
@jahio
jahio / osx-disk-utility.md
Last active January 5, 2017 19:48
What OS X's Disk Utility SHOULD Be Able to Do - But It Got Nerfed

Notes on making USB disks from the macOS Console

Since Apple destroyed the awesome tool that was Disk Utility in the pre-Capitan days, we now have to resort to this kind of lunacy to do what used to be a simple task. Way to go, Apple. You're making Microsoft look borderline useful with these kinds of fuck-ups, and I find myself gravitating toward the power, consistency and flexibility I can get with Linux with each passing day. Get your shit together.

...anyway...

tl;dr

@jahio
jahio / riak.conf
Last active February 18, 2016 00:11
riak.conf / dev setup on os x after ulimit tweaks in docs / installed via homebrew
## Where to emit the default log messages (typically at 'info'
## severity):
## off: disabled
## file: the file specified by log.console.file
## console: to standard output (seen when using `riak attach-direct`)
## both: log.console.file and standard out.
##
## Default: file
##
## Acceptable values:
@jahio
jahio / .editorconfig
Created September 20, 2015 19:21
My Preferred .editorconfig
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
@jahio
jahio / DefaultKeyBinding.dict
Created September 5, 2015 19:57
Home and End Key Remapping - OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
// Home
"\UF729" = "moveToBeginningOfLine:";
// End
"\UF72B" = "moveToEndOfLine:";
// Shift+Home (highlight from cursor to start of line)
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
@jahio
jahio / snapshots.rb
Created June 29, 2015 22:10
ENV Snapshots for EY Cloud Client
# Assuming you've authenticated with an object named 'api'...
env = (api.environments.select { |x| x.name == "my_uniqe_env_name"}).first
env.snapshots
# big list of all environment snapshots here (array)
#
# See your app master snapshots (array):
env.snapshots.select { |x| x.role == "app_master" }
@jahio
jahio / install.sh
Last active August 29, 2015 14:16
Install modern Ruby on Ubuntu
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev tmux vim git libxml2-dev libxslt1-dev libpq-dev
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
source ~/.profile && rbenv install 2.2.1 && rbenv global 2.2.1
@jahio
jahio / keybase.md
Created April 3, 2014 00:08
keybase.md

Keybase proof

I hereby claim:

  • I am jaustinhughey on github.
  • I am jaustinhughey (https://keybase.io/jaustinhughey) on keybase.
  • I have a public key whose fingerprint is F249 E940 A507 8A0B BD55 4C71 7280 6053 CF44 4E8A

To claim this, I am signing this object:

@jahio
jahio / dna.json
Created March 29, 2014 03:20
Example dna.json for Engine Yard Cloud
{
"alert_email": "email address where you want automated warnings to go",
"backup_interval": "int value for db backups, configurable on dashboard",
"backup_window": "int value for db backups, configurable on dashboard",
"ruby_version": "Ruby 1.9.3 - could be 2.0.0 or something else",
"db_host": "internal hostname of your database master",
"db_slaves": [
"db replica hosts appear here. only works with [Postgre|My]SQL"
],
"user_ssh_key": [