Skip to content

Instantly share code, notes, and snippets.

View ralph's full-sized avatar

Ralph von der Heyden ralph

View GitHub Profile
@ralph
ralph / ddl.sql
Created September 20, 2012 16:08
Import Geoplanet to MySQL
CREATE TABLE `places` (
`woeid` varchar(15) NOT NULL,
`iso` varchar(6) NOT NULL,
`name` text NOT NULL,
`language` varchar(6) NOT NULL,
`type` varchar(15) NOT NULL,
`parent` varchar(15) NOT NULL,
PRIMARY KEY (`woeid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aliases` (
@ralph
ralph / install.sh
Created February 20, 2012 11:09
Install Ruby 1.9.3-p125 with falcon patchset, without XCode
brew install https://raw.github.com/adamv/homebrew-alt/master/duplicates/autoconf.rb
brew link autoconf
brew install https://raw.github.com/adammw/homebrew-alt/automake/duplicates/automake.rb
brew link automake
rvm cleanup all
rvm install 1.9.3-perf --patch falcon,debug
@ralph
ralph / ruby test_test.rb
Created November 2, 2011 16:12
Ruby 1.9.3 sample test case to try out the parallel test runner
Run options:
# Running tests:
..
Finished tests in 0.000774s, 2583.9793 tests/s, 2583.9793 assertions/s.
2 tests, 2 assertions, 0 failures, 0 errors, 0 skips
@ralph
ralph / install-ruby-1.9.3-compatible-ruby-debug-gems-with-bundler.sh
Created November 2, 2011 10:37
Install Ruby 1.9.3 compatible ruby-debug gems
curl http://files.rubyforge.vm.bytemark.co.uk/ruby-debug19/linecache19-0.5.13.gem \
> vendor/cache/linecache19-0.5.13.gem
curl http://files.rubyforge.vm.bytemark.co.uk/ruby-debug19/ruby-debug-base19-0.11.26.gem \
> vendor/cache/ruby-debug-base19-0.11.26.gem
bundle config build.ruby-debug-base19 \
--with-ruby-include=$rvm_path/src/`rvm current | sed 's/@.*//'`
@ralph
ralph / configure.patch
Created November 1, 2011 12:13
ruby-1.9.3-p0 configure patch to enable ruby-debug19 support
This file has been truncated, but you can view the full file.
diff --git a/configure b/configure
index 10f7d1b..631bb47 100755
--- a/configure
+++ b/configure
@@ -1,83 +1,60 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
-#
+# Generated by GNU Autoconf 2.61.
@ralph
ralph / github-flavored-markdown.rb
Created October 20, 2011 11:39
Markdown Processor for Redcarpet version 2, for usage on the command line, in Marked etc. Supports syntax highlighting via Pygments.
#!/usr/bin/env ruby
# Processor for Github flavored markdown, inspired by:
# https://github.com/alampros/Docter/blob/master/bin/github-flavored-markdown.rb
#
# Current version of this script can be found here:
# https://gist.github.com/1300939
#
# Adapted for Redcarpet version 2 by Ralph von der Heyden
# http://github.com/ralph
# http://twitter.com/ralph
@ralph
ralph / Amazon Linux AMI Bootstrapping
Created October 28, 2010 15:32
Enter the following script as user data while firing up new instances and you will find a basic ruby environment, e.g. in order to start your chef provisioning.
#!/bin/bash
yum -y install make gcc-c++ zlib-devel openssl-devel
yum -y install ruby-devel ruby-irb ruby-rdoc ruby-ri
cd /tmp
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar xfz rubygems-1.3.7.tgz
ruby rubygems-1.3.7/setup.rb
# Capistrano Recipes for managing delayed_job on SUN Solaris
#
# Add these callbacks to have the delayed_job process restart when the server
# is restarted:
#
# after "deploy:stop", "delayed_job:stop"
# after "deploy:start", "delayed_job:start"
# after "deploy:restart", "delayed_job:restart"
Capistrano::Configuration.instance.load do
<a href="{{post.url}}#disqus_thread">View Comments</a>
---
layout: default
---
<h3>{{ page.title }}</h3>
{{ content }}
<div id="disqus_thread"></div>
<script type="text/javascript" src="http://disqus.com/forums/ralphsblog/embed.js"></script>