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
def int_to_bool value | |
value == "0" ? false : true | |
end |
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
source 'https://rubygems.org' | |
gem 'mysql2' |
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 Object | |
def method_missing | |
x = methods.sample | |
arity = method(x).arity.abs | |
args = Array.new(arity) { ObjectSpace.each_object.to_a.sample } | |
send x, *args | |
end | |
end |
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
[merge "db_structure"] | |
name = regenerate_db_structure | |
driver = ./script/regenerate_structure && cp db/structure.sql %A |
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
worlds["rea"] = "/home/ubuntu/minecraft/rea" | |
purebdcraft = "/home/ubuntu/minecraft/resourcepack_pureBDcraft.zip" | |
outputdir = "/home/ubuntu/minecraft/rea-render" | |
def playerSpawnIcons(poi): | |
if poi['id'] == 'PlayerSpawn': | |
poi['icon'] = "bed.png" | |
return "Spawn for %s" % poi['EntityId'] | |
def playerIcons(poi): |
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 ruby | |
require 'digiusb' | |
usage = "Usage: digicolor light_number #hex_color" | |
raise usage unless ARGV[1] | |
idx = ARGV[0].to_i | |
hex = ARGV[1] |
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
= Ruby Packaging Standard | |
The aim of this document is two-fold. First, to specify a common | |
structure of how a Ruby package distributed as source (that is, but | |
not limited to, development directories, version-controlled | |
repositories, .tar.gz, Gems, ...) should conform to. | |
Second, to document common and proven ways to structure Ruby packages, | |
and to point out certain anti-patterns that sneaked into common use. | |
It is by intent not to innovate. |
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 'nokogiri' | |
src = <<-XML | |
<office:text | |
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" | |
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"> | |
<text:p>one <text:span>span</text:span></text:p> | |
<text:p>two</text:p> | |
</office:text> | |
XML |
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
source 'http://gems.devint.lpo' # internal gem server | |
source "http://rubygems.org/" | |
gem 'rails', '~> 2.3.14' | |
gem 'rake' | |
gem 'rdoc' | |
gem 'pg' | |
gem "rest-client", :require => 'restclient' | |
gem "mime-types", :require => "mime/types" | |
gem "dim-ruby-net-ldap", "~> 0.1.1", :require => "net/ldap" |
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
[0;90;29mbabushka { | |
[0m (defining babushka against Babushka::Dep::BaseTemplate) | |
[0;90;29m$ uname -s[0m | |
Darwin | |
[0;90;29m$ sw_vers[0m | |
ProductName: Mac OS X | |
ProductVersion: 10.7.2 | |
BuildVersion: 11C74 | |
setup not defined. |
OlderNewer