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
<script type="text/javascript">/* <![CDATA[ */ | |
var types = [ | |
'text', | |
'application'//, | |
]; | |
var subtypes = [ | |
'javascript', | |
'jscript', | |
'ecmascript', |
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 detect(path) | |
git = File.directory?(File.join(path, '.git')) | |
svn = File.directory?(File.join(path, '.svn')) | |
hg = File.directory?(File.join(path, '.hg')) | |
bzr = File.directory?(File.join(path, '.bzr')) | |
case [git, svn, hg, bzr] | |
when [true, false, false, false] then SourceControl::Git.new(:path => path) | |
when [false, true, false, false] then SourceControl::Subversion.new(:path => path) | |
when [false, false, true, false] then SourceControl::Mercurial.new(:path => path) |
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
From 14c3cd15dd0f50dc02fcfa1a01ad93c723bba36d Mon Sep 17 00:00:00 2001 | |
From: Chris Griego <[email protected]> | |
Date: Tue, 4 May 2010 17:05:42 -0500 | |
Subject: [PATCH] Fix halting callbacks | |
--- | |
lib/mongoid/persistence.rb | 3 ++- | |
lib/mongoid/persistence/insert.rb | 3 +-- | |
2 files changed, 3 insertions(+), 3 deletions(-) |
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 Chef | |
class Recipe | |
def has_gem?(name, version=nil) | |
if !$GEM_LIST | |
gems = {} | |
`gem list --local`.each_line do |line| | |
gems[$1.to_sym] = $2.split(/, /) if line =~ /^(.*) \(([^\)]*)\)$/ | |
end | |
$GEM_LIST = gems | |
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
# /etc/mysql/my.cnf: The global mysql configuration file. | |
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.1,v 1.3 2006/05/05 19:51:40 chtekk Exp $ | |
# The following options will be passed to all MySQL clients | |
[client] | |
port = 3306 | |
[mysql] | |
character-sets-dir=/usr/share/mysql/charsets | |
default-character-set=utf8 |
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
[Mon, 16 Aug 2010 16:50:08 -0700] ERROR: execute[start sysklogd] (/etc/chef/recipes/cookbooks/sysklogd/recipes/default.rb line 1) had an error: | |
/etc/init.d/sysklogd start returned 1, expected 0 | |
---- Begin output of /etc/init.d/sysklogd start ---- | |
STDOUT: * ERROR: sysklogd is already starting. | |
STDERR: | |
---- End output of /etc/init.d/sysklogd start ---- |
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
// I want to unset comments.moderated for embedded document in the whole collection | |
{ | |
"_id" : ObjectId("4cb7f2d5fe38855e43897d13"), | |
"title" : "Blog Examples Considered Harmful", | |
"comments" : [ | |
{ | |
"by" : "Bob", | |
"moderated" : true, | |
"text" : "first!" | |
}, |
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
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb | |
index 1607637..b607ebd 100644 | |
--- a/activeresource/lib/active_resource/base.rb | |
+++ b/activeresource/lib/active_resource/base.rb | |
@@ -1239,9 +1239,10 @@ module ActiveResource | |
@attributes[key.to_s] = | |
case value | |
when Array | |
- resource = find_or_create_resource_for_collection(key) | |
+ resource = nil |
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://rubygems.org" | |
gem 'i18n', '~> 0.6.0beta1' |
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 'rubygems' | |
require 'bundler/setup' | |
require 'mongo' | |
@conn = Mongo::Connection.new | |
@db = @conn['supply_chain_development'] | |
puts @db['properties'].find.to_a.size |
OlderNewer