Skip to content

Instantly share code, notes, and snippets.

View anveo's full-sized avatar
🤘

Brian Racer anveo

🤘
View GitHub Profile
@anveo
anveo / logstash_spec.rb
Created February 18, 2015 20:06
logstash spec
$ logstash rspec spec.rb
Using Accessor#strict_set for specs
Run options: exclude {:redis=>true, :socket=>true, :performance=>true, :elasticsearch=>true, :broken=>true, :export_cypher=>true}
..
Finished in 0.11 seconds
2 examples, 0 failures
--- ngx_http_requestid_module_old.c 2012-04-16 04:37:56.000000000 -0600
+++ ngx_http_requestid_module.c 2014-04-17 15:41:13.000000000 -0600
@@ -105,7 +105,7 @@
p = hasht;
static u_char hex[] = "0123456789abcdef";
- for (i = 0; i < MD5_HASH_LEN; i++) {
+ for (i = 0; i < MD5_BHASH_LEN; i++) {
*p++ = hex[hashb[i] >> 4];
*p++ = hex[hashb[i] & 0xf];
@anveo
anveo / gist:17798e850e9fd48bfc9f
Created May 6, 2014 22:58
Purge all cookbooks
knife cookbook bulk delete '.*' -p
@anveo
anveo / gist:10996805
Last active August 29, 2015 13:59
homebrew rbenv
$ xcode-select --install # or manually from https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-
$ brew install libyaml
$ brew install openssl
$ brew install readline
$ env CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 2.1.1
@anveo
anveo / keybase.md
Created April 3, 2014 04:50
keybase.md

Keybase proof

I hereby claim:

  • I am anveo on github.
  • I am anveo (https://keybase.io/anveo) on keybase.
  • I have a public key whose fingerprint is EAF0 06ED FBEC 87A6 B749 9F1F CBCD C5E5 4533 09E9

To claim this, I am signing this object:

before_exec do |server|
# Switch to https://github.com/bkeepers/dotenv/pull/61 when released
# Dotenv.overload
ENV.update Dotenv::Environment.new('.env')
end
cd /root
git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build
sh install.sh
CONFIGURE_OPTS="--disable-install-rdoc" MAKE_OPTS="-j `nproc`" ruby-build 1.9.3-p484 /usr/local
gem update --no-rdoc --no-ri
W/ActivityManager( 398): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
E/DatabaseUtils( 398): Writing exception to parcel
E/DatabaseUtils( 398): java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
E/DatabaseUtils( 398): at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13090)
E/DatabaseUtils( 398): at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
E/DatabaseUtils( 398): at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:607)
E/DatabaseUtils( 398): at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
E/DatabaseUtils( 398): at android.content.ContentProviderNative.onTransact(ContentProviderNative.
@anveo
anveo / remove_node_modules.sh
Created December 4, 2013 16:51
remove node_modules from git history
git filter-branch --tree-filter 'rm -rf node_modules' HEAD
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'
@anveo
anveo / gist:7309977
Last active December 27, 2015 10:19 — forked from ivanvanderbyl/gist:4222308
Upgrade postgresql 9.2 to 9.3
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3
sudo su -l postgres
psql -d template1 -p 5433
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
service postgresql stop
/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.2/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.2/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.2/main/postgresql.conf"