Skip to content

Instantly share code, notes, and snippets.

View andxyz's full-sized avatar
:octocat:
ship it

Andrew Stevens andxyz

:octocat:
ship it
View GitHub Profile
#!/usr/bin/env bash
set -e
set -x
git fetch --all --prune
gfind . -iname 'Gemfile' -prune -printf "%h\n" | sort --unique | \
gxargs -n1 -P4 -L1 \
bash -c 'echo "Installing gems for $0"; cd "$0"; bundle check || bundle install'
@andxyz
andxyz / gist:1828bf3b0947b1be2a93fd440b1ed149
Created December 7, 2016 22:36
Writing Commit Messages

Writing Commit Messages

One line summary (< 50c)

Longer description (wrap at 72c)

Summary

@andxyz
andxyz / defaults.rb
Created April 12, 2016 05:17 — forked from stevenharman/defaults.rb
A subtle difference between Ruby's Hash.fetch(:key, :default) vs. (Hash[:key] || :default)
h = {
'a' => :a_value,
'b' => nil,
'c' => false
}
h.fetch('a', :default_value) #=> :a_value
h.fetch('b', :default_value) #=> nil
h.fetch('c', :default_value) #=> false
h.fetch('d', :default_value) #=> :default_value
@andxyz
andxyz / chrome_extensions.md
Last active March 7, 2016 20:46
chrome extensions

Generated: Mon, 07 Mar 2016 20:44:08 GMT User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

Extensions: 26

Here is a sample application.yml note figaro expects every key value pair to have a string as the value.

# application.yml
development:
  TWILIO_ACCOUNT_SID: 'AC1234…'
  TWILIO_AUTH_TOKEN: 'abc12…'
{
/* What engine to use; one of grep, ack, the_silver_searcher, or git_grep (or find_str, on Windows) */
/* The default is grep because it's widely available on *nix machines, but ack and The Silver Searcher are both faster, */
/* and git grep is also faster, but only works inside a Git repository */
"search_in_project_engine": "git_grep",
/* GitGrep configuration */
"search_in_project_GitGrep_path_to_executable": "/usr/local/bin/git",
"search_in_project_GitGrep_mandatory_options": "grep --break --heading --line-number",
[
//willbond alignment
{ "keys": ["command+shift+a"], "command": "alignment" },
// scroll to and highlight the file on the left nav
{ "keys": ["shift+super+r"], "command": "reveal_in_side_bar" },
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+command+v"], "command": "paste" },
// auto_match_enabled is annoying me when it eats my endbrackets
{ "keys": [")"], "command": "insert", "args": {"characters": ")"}, "context":
user="kibana"
group="root"
chroot="/"
chdir="/"
nice=""
@andxyz
andxyz / 030_update_platform_config.js
Created November 9, 2015 20:46 — forked from marcocarnazzo/030_update_platform_config.js
Ionic/Cordova update platform config
#!/usr/bin/env node
/** This hook updates platform configuration files based on preferences and config-file data defined in config.xml.
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported.
See http://stackoverflow.com/questions/28198983/ionic-cordova-add-intent-filter-using-config-xml
Preferences:
1. Preferences defined outside of the platform element will apply to all platforms
2. Preferences defined inside a platform element will apply only to the specified platform