Skip to content

Instantly share code, notes, and snippets.

fireant-2:~ jro$ /Library/Application\ Support/Spanning\ Sync/Spanning\ Sync.app/Contents/MacOS/Spanning\ Sync -disable-contact-images
disabling contact image syncing...
done.
fireant:~ jro$ /Library/Application\ Support/Spanning\ Sync/Spanning\ Sync.app/Contents/MacOS/Spanning\ Sync -disable-contact-images
disabling contact image syncing...
done.
for i in `find . | grep rhtml | grep -v svn`; do
svn mv $i .$(echo $i | awk -F'.' '{ print $(NF-1) }').html.erb
done
mysqldump -u root -p --tables some_table other_table \
--where='created_at BETWEEN DATE_SUB(NOW(), INTERVAL 8 DAY) AND NOW()' > awesome_dump.sql
@jro
jro / gist:112266
Created May 15, 2009 15:55
emacs elim debugging
make/elim-func-handlers-c.sh handlers/account_menu.c handlers/account_menu_action.c handlers/account_options.c handlers/add_account.c handlers/add_buddy.c handlers/add_chat.c handlers/buddy_menu.c handlers/buddy_menu_action.c handlers/chat_params.c handlers/command.c handlers/connect.c handlers/debug_mode.c handlers/default.c handlers/disconnect.c handlers/end_conversation.c handlers/enumerations.c handlers/get_prefs.c handlers/init.c handlers/join_chat.c handlers/list_accounts.c handlers/list_protocols.c handlers/message.c handlers/register.c handlers/remove_account.c handlers/remove_buddy.c handlers/response.c handlers/set_account_options.c handlers/set_prefs.c handlers/status.c handlers/unregister.c > elim-func-handlers.c;
cc -Wall -std=c99 -D_GNU_SOURCE -DGLIB_HAS_ADD_SECONDS -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/libxml2 -I/sw/include -I/sw/include/libpurple -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -c -o elim-func-handlers.o elim-func-handlers.c
elim-func-handlers
@jro
jro / Chromium
Created December 13, 2009 01:41
#!/bin/sh
exec /Applications/Chromium.app/Contents/MacOS/Chromium-app --enable-extension-timeline-api $@
# Package Maintainer: Increment phusion_release to match latest release available
%define phusion_release 2010.02
Summary: Ruby Enterprise Edition (Release %{phusion_release})
Name: ruby-enterprise
Vendor: Phusion.nl
Packager: Adam Vollrath <hosting@endpoint.com>
Version: 1.8.7
Release: 4%{dist}
License: GPL
#!/usr/bin/env ruby
# Command line util for acquiring a one-off Twitter OAuth access token
# Based on http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/
require 'rubygems'
require 'oauth'
puts <<EOS
Set up your application at https://twitter.com/apps/ (as a 'Client' app),
def start_time
if @screen
# This has to be done by the server in case the clocks are different
# on the client
start_time = Time.now + 2.minutes
respond_with (start_time - Time.now).json
else
render(:status => 404)
end
end
<script type="text/javascript">
var starts_in = 600;
var starts_in_url = 'http://' + window.location.host + window.location.pathname + '/starts_in';
function play_video() {
//alert("Playing");
$("video")[0].play();
setInterval("showNote();", 30000);
}