This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 http://src.chromium.org/svn/trunk/tools/depot_tools | |
export PATH=`pwd`/depot_tools:$PATH | |
mkdir chromium | |
pushd chromium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download and git methods swiped from http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb | |
require 'open-uri' | |
def download(from, to = from.split("/").last) | |
#run "curl -s -L #{from} > #{to}" | |
file to, open(from).read | |
rescue | |
puts "Can't get #{from} - Internet down?" | |
exit! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WidgetController < ApplicationController | |
include RespondGlue | |
def index | |
@widgets = some_magic | |
respond_glue(:html) { render(:template => 'widgets/index') } | |
end | |
def show | |
@widget = get_widget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.doAfter = function(time,f) { | |
$('body').animate({ opacity: 1 }, time, f); | |
}; | |
})(jQuery); | |
$(document).ready(function(){ | |
$.doAfter(2500,function() { | |
$('.fadeout').fadeOut('slow'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
role_on :admin, :except => [:index,:show] | |
role_on :other_role, :on => [:index,:show] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.setupRemoteInline = function() { | |
return this.each(function() { | |
$(this).click(function() { | |
var link = $(this); | |
link.unbind('click'); | |
link.html('Loading...'); | |
$.ajax({ | |
url:this.href, | |
type:'GET', | |
success:function(data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking blog.darkhax.com (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests | |
Finished 400 requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "thread" | |
module Gtk | |
PENDING_CALLS_MUTEX = Mutex.new | |
PENDING_CALLS = [] | |
def self.thread_protect(&proc) | |
if Thread.current == Thread.main | |
proc.call | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))") | |
end |
OlderNewer