Skip to content

Instantly share code, notes, and snippets.

View abraham's full-sized avatar
🍩
donot mind if I do

Abraham Williams abraham

🍩
donot mind if I do
View GitHub Profile
@guenter
guenter / move_to_rds.rb
Created November 11, 2010 02:14
A quick and dirty script to move a database into Amazon RDS (or any other database). Can transfer part of the data beforehand.
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
CLI:
homebrew
git
rvm
ruby 1.9.x
rails 3.x
googlecl
irssi
readline
unrar
{
"verb": "post",
"postedTime": "2010-10-21T20:57:32+00:00",
"inReplyTo": {
"link": "http://twitter.com/gilesgoatboy/statuses/28056868330"
},
"body": "@gilesgoatboy Sadly my latin is mostly read only. Nescio latinam bene. (google translate is not half bad at conjugating btw)",
"actor": {
"location": {
"displayName": "Boulder, CO",
/*
natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript.
Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre)
Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be>
Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion.
Copyright (C) 2003 by Pierre-Luc Paour <[email protected]>
The Java version was based on the C version by Martin Pool.
Copyright (C) 2000 by Martin Pool <[email protected]>
@episod
episod / mention.xml
Created October 11, 2010 14:00
a mention and reply
<status>
<created_at>Fri Oct 08 14:43:57 +0000 2010</created_at>
<id>26755568880</id>
<text>@episod&#160;Thinking today's avatar might be crazier than any one before. I thought the sensible one the other day was pretty good :-)</text>
<source>&lt;a href=&quot;http://www.tweetdeck.com&quot; rel=&quot;nofollow&quot;&gt;TweetDeck&lt;/a&gt;</source>
<truncated>false</truncated>
<in_reply_to_status_id></in_reply_to_status_id>
<in_reply_to_user_id>819797</in_reply_to_user_id>
<favorited>false</favorited>
<in_reply_to_screen_name>episod</in_reply_to_screen_name>
<?php
/**
* Compares all running instances to all reserved instances and reports
* utilization. Useful for making sure you're not wasting money. :P
*
* Requires EC2_CERT and EC2_PRIVATE_KEY environment variables to be set.
*
* @author Dave
* @date 2010-10-05
*/
<?php
// Define the 'class' class
$class = Obj()
->fn('new', function ($class) {
$newClass = Obj($class->methods)
->fn('new', function($class) {
$obj = Obj($class->imethods);
$args = func_get_args();
array_shift($args);
/*-------- Here's how your Gists render in #newtwitter's details pane --------*/
twttr.mediaType('twttr.media.types.Gist')
.url('http://gist.github.com')
.matcher(/\b(?:https?\:\/\/)?gist\.github\.com\/(\S+)/g)
.icon('generic')
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
coj@revolverocelot ~ > curl -u myusername http://api.twitter.com/1/account/rate_limit_status.json?source=twitterandroid
Enter host password for user 'myusername':
{"hourly_limit":20000,"reset_time_in_seconds":1284388122,"reset_time":"Mon Sep 13 14:28:42 +0000 2010","remaining_hits":19994}
Mon Sep 13 09:29:07 EDT 2010
coj@revolverocelot ~ > curl -u myusername http://api.twitter.com/1/account/rate_limit_status.json?
Enter host password for user 'myusername':
{"remaining_hits":0,"hourly_limit":0,"reset_time":"Mon Sep 13 14:28:42 +0000 2010","reset_time_in_seconds":1284388122}