Skip to content

Instantly share code, notes, and snippets.

View raldred's full-sized avatar

Rob Aldred raldred

View GitHub Profile
@raldred
raldred / scl.gemspec
Created October 28, 2011 13:37
Gemspec for SCL
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = "scl"
s.version = "0.0.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
@raldred
raldred / homebrew doctor output
Created September 12, 2011 09:31
Doctor output
==> /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. This is an issue if you eg. brew installed Python.
Consider editing your .bashrc to put:
/usr/local/bin
ahead of /usr/bin in your $PATH.
You have a non-brew 'pkg-config' in your PATH:
/usr/bin/pkg-config
@raldred
raldred / brew_install_imagemagick_output
Created September 12, 2011 09:21
Output of failure to compile imagemagick on OSX 10.6 with Xcode 3
==> Downloading https://github.com/trevor/ImageMagick/tarball/6.7.1-1
File already downloaded in /Users/robaldred/Library/Caches/Homebrew
/usr/bin/tar xf /Users/robaldred/Library/Caches/Homebrew/imagemagick-6.7.1-1.tgz
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.1-1 --disable-dependency-tracking --enable-shared --disable-static --with-modules --without-gslib --with-gs-font-dir=/usr/local/share/ghostscript/fonts --without-magick-plus-plus
./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.1-1 --disable-dependency-tracking --enable-shared --disable-static --with-modules --without-gslib --with-gs-font-dir=/usr/local/share/ghostscript/fonts --without-magick-plus-plus
configuring ImageMagick 6.7.1-1
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking target system type... x86_64-apple-darwin10.8.0
checking whether build environment is san
@raldred
raldred / subquery magic.sql
Created March 24, 2011 10:46
pre-preparing inner join results for faster querying and pivoting of data
create temporary table if not exists imports
(
year int(4),
country_id int(11),
value int(30),
INDEX `index_on_year_and_country_id` (year,country_id)
);
truncate imports;
insert into imports (
select year,country_id,sum(value)
- content_for :start_again do
- start_again order
%h1= t('checkout.payment.title')
-order_payment_errors_title(@order)
-order_errors_for(@order,:base)
.your_details
%h3 Your details
<?php
$step_counter = 1;
$helper = Mage::helper('onestepcheckout/checkout');
?>
<?php if(!$this->canCheckout() || !$this->validateMinimumAmount()): ?>
<?php if($this->settings['checkout_title']): ?>
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
<?php endif; ?>
@raldred
raldred / gist:616615
Created October 8, 2010 10:43
arduino_hudson_status
#include <Ethernet.h>
#include <WString.h>
int red = 6;
int yellow = 7;
int green = 8;
byte mac[] = { 0x00, 0x0C, 0x29, 0x8F, 0xA9, 0xE5 };
byte ip[] = { 192,168,3,244 };
byte gateway[] = { 192,168,3,1 };
-- ssh-to-test-slaves.applescript
--
-- Created by Rob Aldred on 2010-05-21.
-- Copyright (c) 2010 . All rights reserved.
--
-- Usage:
-- osascript -ss ssh-to-slaves.applescript
on run
robaldred 6643 69.0 0.4 2450232 17392 s012 R+ 2:13pm 0:00.34 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6642 20.6 0.4 2450264 17784 s012 S+ 2:13pm 0:00.41 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6641 4.5 0.4 2450264 17784 s012 S+ 2:13pm 0:00.42 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6640 0.9 0.4 2450264 17784 s012 S+ 2:13pm 0:00.41 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6639 0.1 0.4 2450264 17784 s012 S+ 2:13pm 0:00.42 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6617 0.0 0.4 2450264 17784 s012 S+ 2:13pm 0:00.42 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6614 0.0 0.4 2450264 17784 s012 S+ 2:13pm 0:00.41 /Users/robaldred/.rvm/rubies/ruby-1.8.7-p174/bin/ruby -e 42
robaldred 6609 0.0 0.4 2450264 17784 s012 S+ 2:13pm 0:00.43 /Users/robaldred/.rvm/rubies
→ rake hydra:spec --trace
(in /Users/robaldred/Sites/ahoys)
loading bundler gems
** Invoke hydra:spec (first_time)
** Invoke env:test (first_time)
** Execute env:test
** Execute hydra:spec
Hydra Testing [> ] 0/1Booting rail env test
Done booting rails env
Starting Sunspot Server