Skip to content

Instantly share code, notes, and snippets.

@stevenh512
stevenh512 / test.log
Created March 30, 2012 01:08
Log of Diaspora's features/follows_tags.feature and features/tags.feature with latest acts_as_taggable_on gem
New Relic Agent not running.
New Relic Agent not running.
(0.2ms) BEGIN
(0.2ms) COMMIT
(47.6ms) SELECT @@FOREIGN_KEY_CHECKS
(0.2ms) SET FOREIGN_KEY_CHECKS = 0
(19.3ms) SELECT DATABASE() as db
(216.0ms) select table_name from information_schema.views where table_schema = 'diaspora_test'
(462.3ms) TRUNCATE TABLE `account_deletions`;
(348.2ms) TRUNCATE TABLE `aspect_memberships`;
@stevenh512
stevenh512 / test.log
Created March 30, 2012 00:48
Log of Diaspora's features/tags.feature with latest acts_as_taggable_on gem
New Relic Agent not running.
New Relic Agent not running.
(0.2ms) BEGIN
(0.2ms) COMMIT
(47.6ms) SELECT @@FOREIGN_KEY_CHECKS
(0.2ms) SET FOREIGN_KEY_CHECKS = 0
(19.3ms) SELECT DATABASE() as db
(216.0ms) select table_name from information_schema.views where table_schema = 'diaspora_test'
(462.3ms) TRUNCATE TABLE `account_deletions`;
(348.2ms) TRUNCATE TABLE `aspect_memberships`;
@stevenh512
stevenh512 / jasmine-prepare
Created March 29, 2012 08:51
Prepare Diaspora's Jasmine fixtures
#!/bin/sh
rm -rf tmp
mkdir tmp
echo "Migrating database"
echo "bundle exec rake db:migrate"
bundle exec rake db:migrate
echo "bundle exec rake db:test:prepare"
bundle exec rake db:test:prepare
echo "Building Jasmine fixtures"
echo "bundle exec rspec spec/controllers/jasmine_fixtures"
@stevenh512
stevenh512 / 0001-stop-using-like.patch
Created March 29, 2012 04:46
Patches for acts-as-taggable-on
From 5d61df52623fe0950cdcf99a831508bdd2dacb76 Mon Sep 17 00:00:00 2001
From: Raphael Sofaer <raphael@joindiaspora.com>
Date: Fri, 11 Mar 2011 13:28:53 -0800
Subject: [PATCH 1/4] Stop using LIKE to do case insensitivity, instead just
downcase everything on the way in. Tests now pass with
a utf8_bin collation in MYSQL
---
lib/acts_as_taggable_on/tag.rb | 21 +++++++++++++--------
spec/spec_helper.rb | 2 +-
@stevenh512
stevenh512 / redis_on_tiger.diff
Created October 3, 2011 10:04
redis on osx tiger(ppc)
diff --git a/Makefile b/Makefile
index 5219a63..4f9cfad 100644
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,10 @@ ifeq ($(uname_S),SunOS)
CCLINK?= -ldl -lnsl -lsocket -lm -lpthread
else
CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
- CCLINK?= -lm -pthread
+ CCLINK?= -lm -lpthread
@stevenh512
stevenh512 / threadfix.rb
Created September 20, 2011 18:52
Monkey-patch Ruby 1.9.2 Thread class to try to fix issue #5342
# Monkey-patch Ruby 1.9.2 Thread class to try to fix issue #5342
#
# http://redmine.ruby-lang.org/issues/5342
require 'thread'
class ConditionVariable
def wait(mutex, timeout=nil)
begin
# TODO: mutex should not be used
@waiters_mutex.synchronize do
require 'net/http'
require 'uri'
module Redcar
class Pastie
def self.keymaps
linwin = Keymap.build("main", [:linux, :windows]) do
link "Ctrl+Shift+P", Pastie::PasteSelection

Rails 3.0.pre on App Engine

You can Rails 3 on App Engine, but it won’t be especially useful until bundler 10. You should try these instead:

Install the Development Environment

The gems for the development environment include a pre-release appengine-tools gem that provides a pre-release version of jruby-rack.

### Keybase proof
I hereby claim:
* I am stevenh512 on github.
* I am stevenh512 (https://keybase.io/stevenh512) on keybase.
* I have a public key whose fingerprint is 08F8 029E 6DE0 3F1B 0177 D9EE B843 E6FD 8D37 FDE9
To claim this, I am signing this object:
@stevenh512
stevenh512 / pubkey.asc
Created July 8, 2014 03:39
GPG public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
mQINBFIEcFABEADSRqEJYRiiX00KdCQDOn+jymGy09QpMX3YRzR3kYqR/gFR3hmn
NutiXcI2V1axVq/nCn/Gn0Z6cI3B40cQojaddEcFB5qR+FQ7HS563f7pPKSt5GVa
q2MUZ8U70awSJH+1gh+Lu2PmuiwMvY17csjDR+hRtXPHYiWbsPnP5O2Tl9+l2SMG
eY15BQSnV3LQaftYHVBsHLSRMw3SUXMI7eScfq+AUo40cPSbk1URQJQdKFdx/mB/
gs/jq3mrc2cl+CivlpZTbCc2PcWKgwXaY++sUAK7BjOhkrTdtBOkBRIO+qoAPwiI
EtDyBYPDSyLeji7IFZHRvjobwJhWxpPv23A03S4rHHNiBXn+/gYj1S/zL2duO8qv
LGJJAGWE3E+XQ1HMlALDM0/eCdmTHKX0uDBZdWnckCbPAP8eghpnHgAvcRz19djQ