I hereby claim:
- I am patcoll on github.
- I am patcoll (https://keybase.io/patcoll) on keybase.
- I have a public key whose fingerprint is 440C 9946 B7C6 D95E 66B9 AF79 CD15 A5E4 D60B 08AD
To claim this, I am signing this object:
// Copyright 2009 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package main | |
import "fmt" | |
// Send the sequence 2, 3, 4, ... to channel 'ch'. | |
func generate(ch chan int) { |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* twig.php | |
* | |
* Command-line script to process YAML frontmatter with Twig templates. | |
* Inspired by Mustache <http://github.com/defunkt/mustache>. | |
* | |
* Example template file (test.html): | |
* --- | |
* people: [ {name: scott}, {name: laura} ] |
Then /^I should be able to change the "(name|teaser_text|full_text)" of the ad with an inline editor$/ do |field| | |
require 'time' | |
selector = ".inline-edit em.text .#{field}" | |
old_value = find(selector).text | |
value = "New Value #{Time.now.to_i}" | |
find(selector).click | |
wait_until { find_field(field) } | |
fill_in(field, :with => value) |
file_content = File.open(datafile).map do |line| | |
line = line.split(',').map { |n| n.strip } | |
line.each_index do |i| | |
line[i] = { labels[i][0] => line[i] } | |
end | |
line = line.inject({}) { |merged,n| merged.update(n) } | |
line = { line.delete('LOGRECNO') => line } | |
end | |
puts file_content.to_json |
require 'rubygems' | |
require 'padrino' | |
class App < Padrino::Application | |
register Padrino::Mailer | |
register Padrino::Helpers | |
get("/") { "index" } | |
get("/index") { "index" } | |
get("/index", :provides => :html) { "index" } |
require 'rubygems' | |
require 'sinatra' | |
$: << '..' | |
# prepare for using the Funnel library | |
require 'funnel' | |
include Funnel | |
# configure pin(s) of the Arduino board |
#!/bin/bash | |
sed s/lucid/karmic/g /etc/apt/sources.list | tee /etc/apt/sources.list.d/karmic.list | |
aptitude update -y | |
cat > /etc/apt/preferences.d/php <<heredoc | |
Package: php5 | |
Pin: version 5.2.* | |
Pin-Priority: 991 | |
Package: php5-cli | |
Pin: version 5.2.* |
#!/bin/bash | |
# installs latest PHPUnit | |
# use sudo if necessary | |
pear upgrade PEAR # newest phpunit needs pear 1.9.2 | |
pear channel-discover components.ez.no | |
pear channel-discover pear.symfony-project.com | |
pear channel-discover pear.phpunit.de | |
pear install phpunit/PHPUnit |
#!/bin/bash | |
# | |
# Copy only certain Zend Framework libs and their dependencies into a specified directory. | |
# | |
# This script was created because copying the entire Zend Framework into an existing project | |
# is not really necessary if you only want to use part of it. However you fall into dependency | |
# hell because most sub-libraries use multi-purpose libs like Zend_Exception and Zend_Validate. | |
# | |
# Put this script in a fresh copy of ZF's `library` folder and run it as follows: | |
# |