Skip to content

Instantly share code, notes, and snippets.

Tony Ford tony4d

View GitHub Profile
@tony4d
tony4d / keybase.md
Created Apr 17, 2014
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am tony4d on github.
  • I am tony4d (https://keybase.io/tony4d) on keybase.
  • I have a public key whose fingerprint is 3F64 5B71 C70B 4BFE 5E2A D205 2AEC 93AD 5C92 5CAC

To claim this, I am signing this object:

@tony4d
tony4d / ruby-from-source.sh
Last active Aug 29, 2015
Compile ruby from source for rbenv on OS X
View ruby-from-source.sh
# Assumptions:
# - You are using rbenv, installed in ~/.rbenv
# - You are using homebrew
# - You want to install ruby 2.1.2 (for example)
#
# Make sure you have openssl installed first
brew install openssl
# Before you begin, download ruby source from https://www.ruby-lang.org/en/downloads/
@tony4d
tony4d / mysql-analyze-all-tables.sh
Created Oct 13, 2015
Analyze all tables in a mysql database from the command line (bash)
View mysql-analyze-all-tables.sh
#!/bin/bash
# To avoid doing things like putting your mysql password on the cli which is not secure
# Use mysql config editor http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html
for table in $(mysql --login-path=mylogins -D database_name -Bse "show tables");
do mysql --login-path=mylogins -D database_name -Bse "analyze table $table";
done
You can’t perform that action at this time.