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
Wolfram = require('wolfram-alpha').createClient(process.env.HUBOT_WOLFRAM_APPID) | |
module.exports = (robot) -> | |
robot.catchAll (msg) -> | |
r = new RegExp "^(?:#{robot.alias}|#{robot.name}) (.*)", "i" | |
matches = msg.message.text.match(r) | |
if matches != null && matches.length > 1 | |
Wolfram.query matches[1], (e, result) -> | |
if result and result.length > 0 | |
msg.send result[1]['subpods'][0]['text'] |
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
module OSXCompat | |
OSX_REGEX = /darwin\d{2}/ | |
SNOW_KITTY = "darwin10" | |
class << self | |
def snow_kitty_or_lower? | |
if darwin? | |
osx_version <= SNOW_KITTY | |
else |
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
module Rubinius | |
# Make this reload friendly without silly constant defined warnings. | |
BUILD_CONFIG = { | |
:command_line => "--prefix=/opt/rbenv/versions/rbx-2.0.0-dev --gemsdir=/opt/rbenv/versions/rbx-2.0.0-dev", | |
:which_ruby => :ruby, | |
:build_ruby => "/usr/bin/ruby1.9.1", | |
:build_rake => "rake", | |
:build_perl => "perl", | |
:llvm => :prebuilt, | |
:llvm_configure => "/tmp/ruby-build.20130613152938.5290/rubinius-2.0.0-dev/vendor/llvm/Release/bin/llvm-config", |
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
module Rubinius | |
# Make this reload friendly without silly constant defined warnings. | |
BUILD_CONFIG = { | |
:command_line => "--prefix=/opt/rbenv/versions/rbx-2.0.0-dev --gemsdir=/opt/rbenv/versions/rbx-2.0.0-dev", | |
:which_ruby => :rbx, | |
:build_ruby => "/opt/rbenv/versions/rbx-2.0.0-dev/bin/rbx", | |
:build_rake => "rake", | |
:build_perl => "perl", | |
:llvm => :prebuilt, | |
:llvm_configure => "/tmp/ruby-build.20130613144949.24356/rubinius-2.0.0-dev/vendor/llvm/Release/bin/llvm-config", |
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
2013-03-07 14:14:35] INFO WEBrick 1.3.1 | |
[2013-03-07 14:14:35] INFO ruby 1.9.3 (2013-01-15) [x86_64-darwin12.3.0] | |
[2013-03-07 14:14:35] INFO WEBrick::HTTPServer#start: pid=54326 port=3000 | |
her version: 0.4.1 | |
localhost - - [07/Mar/2013:14:14:35 MST] "GET /users/1?foobar=true HTTP/1.1" 200 10 | |
- -> /users/1?foobar=true | |
localhost - - [07/Mar/2013:14:14:35 MST] "GET /users/1/projects HTTP/1.1" 200 10 | |
- -> /users/1/projects | |
[2013-03-07 14:14:35] INFO going to shutdown ... |
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 'multi_json' | |
module PostalCodeLookup | |
GEONAMES_URL = 'http://api.geonames.org/postalCodeSearchJSON' | |
def self.find_postal_code_data(code) | |
info = nil | |
begin | |
client = HTTPClient.new |
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
Airbrake.configure do |config| | |
# ... | |
if Rails.env.staging? | |
config.environment_name = `hostname -f`.strip | |
end | |
# ... | |
end |
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 | |
info=/Applications/Postbox.app/Contents/Info.plist | |
backup=$info.backup | |
if [[ $1 == "restore" ]]; then | |
cp $backup $info | |
exit | |
fi |
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
undefined method `name' for "":String | |
@ vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/declaration/implicit.rb:11:in `==' | |
vendor/bundle/ruby/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/active_record/connection_adapters/oracle_enhanced_dirty.rb:20:in `field_changed?' | |
vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.17/lib/active_record/attribute_methods/dirty.rb:57:in `write_attribute' | |
vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.17/lib/active_record/attribute_methods/write.rb:14:in `product_id=' | |
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:16:in `block (2 levels) in object' | |
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:15:in `each' | |
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:15:in `block in object' | |
vendor/bundle/ruby/1.9.1/gems/factory_girl-4.1.0/lib/factory_girl/attribute_assigner.rb:14:in `tap' | |
vendor/bundle/ruby/1.9.1/gems/factor |
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
# Copyright 1999-2006 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
EAPI="2" | |
inherit eutils versionator linux-mod | |
DESCRIPTION="Ceton InfiniTV Linux Drivers" | |
HOMEPAGE="http://cetoncorp.com/infinitv_support/linux-drivers/" | |
SRC_URI="http://cetoncorp.com/downloads/ceton_infinitv_linux_driver_1_7.tar.gz" |