This file contains hidden or 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
| #!/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.* |
This file contains hidden or 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 'rubygems' | |
| require 'sinatra' | |
| $: << '..' | |
| # prepare for using the Funnel library | |
| require 'funnel' | |
| include Funnel | |
| # configure pin(s) of the Arduino board |
This file contains hidden or 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 'rubygems' | |
| require 'padrino' | |
| class App < Padrino::Application | |
| register Padrino::Mailer | |
| register Padrino::Helpers | |
| get("/") { "index" } | |
| get("/index") { "index" } | |
| get("/index", :provides => :html) { "index" } |
This file contains hidden or 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
| 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 |
This file contains hidden or 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 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) |
This file contains hidden or 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
| <?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} ] |
NewerOlder