Skip to content

Instantly share code, notes, and snippets.

Working from home

Daniel Huckstep darkhelmet

Working from home
Block or report user

Report or block darkhelmet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#!/usr/bin/env bash
# install some packages
sudo aptitude install -y subversion pkg-config python perl g++ g++-multilib bison flex gperf libnss3-dev libgtk2.0-dev libnspr4-0d libasound2-dev libnspr4-dev msttcorefonts libgconf2-dev libcairo2-dev libdbus-1-dev wdiff
# get and setup the depot tools
svn co
export PATH=`pwd`/depot_tools:$PATH
mkdir chromium
pushd chromium
View lark_template.rb
# download and git methods swiped from
require 'open-uri'
def download(from, to = from.split("/").last)
#run "curl -s -L #{from} > #{to}"
file to, open(from).read
puts "Can't get #{from} - Internet down?"
View controllers.rb
class WidgetController < ApplicationController
include RespondGlue
def index
@widgets = some_magic
respond_glue(:html) { render(:template => 'widgets/index') }
def show
@widget = get_widget
View jquery-timeout-animate.js
$.doAfter = function(time,f) {
$('body').animate({ opacity: 1 }, time, f);
$.doAfter(2500,function() {
View setup-role.rb
role_on :admin, :except => [:index,:show]
role_on :other_role, :on => [:index,:show]
View jquery-remote-inline.js
$.fn.setupRemoteInline = function() {
return this.each(function() {
$(this).click(function() {
var link = $(this);
success:function(data) {
View output.txt
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/home/darkhelmet/local/llvm-gcc --enable-languages=c,c++ --program-prefix=llvm- --enable-llvm=/home/darkhelmet/local/llvm
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5636) (LLVM build)
View post-varnish.txt
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Licensed to The Apache Software Foundation,
Benchmarking (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 400 requests
View gtk-mod.rb
require "thread"
module Gtk
def self.thread_protect(&proc)
if Thread.current == Thread.main
View cucumber-eval.rb
Then /^I should be (editing|viewing) "([^\"]*)"$/ do |method,login|
func = (method == 'editing' ? 'edit_' : '') + 'user_path'
URI.parse(current_url).path.should == eval("#{func}(User.find_by_login(login))")
You can’t perform that action at this time.