Skip to content

Instantly share code, notes, and snippets.

View alexstubbs's full-sized avatar

Alex Stubbs alexstubbs

  • 100Starlings
  • London & Keszthely (Hungary)
View GitHub Profile
def run
users_with_recent_parcels.find_each do |user|
begin
next if has_trust_pilot_email?(user)
schedule_trust_pilot_email_for(user) if has_recently_scanned_label?(user)
rescue Exception => e
Airbrake.notify e
end
end
end
@alexstubbs
alexstubbs / sphinx.rb
Created April 17, 2012 10:28
Brew formula for install sphinx 0.9.8.1 based on homebrew formula sphinx 2.0.4 git checkout 8dbb32e /usr/local/Library/Formula/sphinx.rb
require 'formula'
class Libstemmer < Formula
# upstream is constantly changing the tarball,
# so doing checksum verification here would require
# constant, rapid updates to this formula.
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz'
homepage 'http://snowball.tartarus.org/'
end
@alexstubbs
alexstubbs / 0001-Formula-to-install-sphinx-0.9.8.1.patch
Created April 17, 2012 10:25
Patch to 2.0.4 git checkout 8dbb32e /usr/local/Library/Formula/sphinx.rb to install sphinx 0.9.8.1
From 194e3668c19878d6d1a2527443ed37ff6e922cb3 Mon Sep 17 00:00:00 2001
From: Alexandru Stubbs <[email protected]>
Date: Tue, 17 Apr 2012 11:23:16 +0100
Subject: [PATCH] Formula to install sphinx 0.9.8.1
---
Library/Formula/sphinx.rb | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Library/Formula/sphinx.rb b/Library/Formula/sphinx.rb
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json
Macports and macports update.
$ sudo mysql_install_db5 --user=mysql
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql5/bin/mysqladmin -u root -h Alexandru-Stubbss-MacBook-Pro.local password 'new-password'
Alternatively you can run: