Skip to content

Instantly share code, notes, and snippets.

View tisba's full-sized avatar
🚀
Perf Testing all the Things!

Sebastian Cohnen tisba

🚀
Perf Testing all the Things!
View GitHub Profile
#!/usr/bin/env bash
rm -rf ~/.rvm/usr
rvm package install iconv
rvm package install readline
rvm package install zlib
rvm package install autoconf
rvm use system
rvm remove 1.9.2
rvm install 1.9.2 --with-iconv-dir=$rvm_path/usr \
--with-readline-dir=$rvm_path/usr \
@tisba
tisba / gist:703646
Created November 17, 2010 16:59
TextMate command snippet for the gemedit gem
#!/usr/bin/env ruby
# REQUIREMENTS:
#
# gem install gemedit
#
# INSTALLATION:
#
# Create a new TextMate command, paste this code, assign an activation shortcut,
# set output to "Show as Tool Tip" and done.
(ruby-1.9.2-p0) {~} I ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.5.0]
(ruby-1.9.2-p0) {~} I irb
ruby-1.9.2-p0 > require "iconv"
LoadError: no such file to load -- iconv
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from (irb):1
from /Users/basti/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'
ruby-1.9.2-p0 >
[2010-09-02 22:10:52] make
file.c: In function ‘file_expand_path’:
file.c:2844: warning: ‘b’ may be used uninitialized in this function
regcomp.c: In function ‘add_compile_string_length’:
regcomp.c:423: warning: implicit conversion shortens 64-bit value into a 32-bit value
regcomp.c:431: warning: implicit conversion shortens 64-bit value into a 32-bit value
regcomp.c: In function ‘compile_string_raw_node’:
regcomp.c:550: warning: implicit conversion shortens 64-bit value into a 32-bit value
regcomp.c: In function ‘get_char_length_tree1’:
regcomp.c:2308: warning: implicit conversion shortens 64-bit value into a 32-bit value
Installing pg (0.9.0) with native extensions /Users/basti/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/basti/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for pg_config... no
=========== WARNING ===========
You are building this extension on OS X without setting the
ARCHFLAGS environment variable, and pg_config wasn't found in
your PATH. If you are seeing this message, that means that the
@tisba
tisba / find_dupes.rb
Created December 22, 2010 19:51
Script to check CouchDB's _all_docs for duplicates
#!/usr/bin/env ruby
# Requirements:
# gem install yajl-ruby
#
# Usage:
#
# $ curl -\# http://localhost:5984/somedb/_all_docs | ./find_dupes.rb
#
# or
[2011-01-21 10:32:38] make
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -I. -I.ext/include/x86_64-darwin10.6.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o main.o -c main.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -I. -I.ext/include/x86_64-darwin10.6.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o dln.o -c dln.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -I. -I.ext/include/x86_64-darwin10.6.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o dmydln.o -c dmydln.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwri
brew install io
/usr/local/bin/git
==> Cloning git://github.com/stevedekorte/io.git
Cloning into /Users/basti/Library/Caches/Homebrew/io--git...
remote: Counting objects: 5525, done.
remote: Compressing objects: 100% (3889/3889), done.
remote: Total 5525 (delta 1627), reused 3906 (delta 1008)
Receiving objects: 100% (5525/5525), 12.46 MiB | 553 KiB/s, done.
Resolving deltas: 100% (1627/1627), done.
==> Downloading patches
[live;Overview]
total_bandwidth.graph_args --base 1000 -l 0
total_bandwidth.cdef 0
total_bandwidth.graph_category network
total_bandwidth.graph_title Aggregated Network Traffic
total_bandwidth.graph_vlabel bits/s
total_bandwidth.upload.label upload
total_bandwidth.upload.sum ip-A-B-C-D=ip-A-B-C-D.eu-west-1.compute.internal:if_eth0.up ip-E-F-G-H=ip-E-F-G-H.eu-west-1.compute.internal:if_eth0.up
total_bandwidth.upload.type COUNTER
total_bandwidth.download.type COUNTER
@tisba
tisba / aws-cfn-tools.patch
Created June 6, 2011 10:25
aws-cfn-tools 1.0.6 -> 1.0.7
diff --git a/Library/Formula/aws-cfn-tools.rb b/Library/Formula/aws-cfn-tools.rb
index 9f58fb7..a6e81c6 100644
--- a/Library/Formula/aws-cfn-tools.rb
+++ b/Library/Formula/aws-cfn-tools.rb
@@ -6,8 +6,8 @@ require "#{File.dirname __FILE__}/ec2-api-tools.rb"
class AwsCfnTools <AmazonWebServicesFormula
homepage 'http://aws.amazon.com/developertools/AWS-CloudFormation/2555753788650372'
url 'https://s3.amazonaws.com/cloudformation-cli/AWSCloudFormation-cli.zip'
- version '1.0.6'
- md5 'f3bff05e8e5e1a169e5f247077583b6e'