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 | |
open "https://github.com/zendesk/zendesk/pull/new/`git rev-parse --abbrev-ref HEAD`" |
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
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
git tag -d 1.4.0 | |
git tag -d 2.2.5 | |
git tag -d rm | |
git tag -d v.1.8.23 | |
git tag -d v0.1.0 | |
git tag -d v0.2.0 | |
git tag -d v1.0.0 | |
git tag -d v1.1.0 | |
git tag -d v1.1.1 | |
git tag -d v1.1.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
# force UTF-8 on all strings back from YAML. | |
class << YAML::DefaultResolver | |
def node_import_with_utf8(node) | |
val = node_import_without_utf8(node) | |
val.force_encoding("UTF-8") if val.respond_to?(:force_encoding) | |
val | |
end | |
alias_method_chain :node_import, :utf8 |
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 Marshal | |
class << self | |
def load_with_utf8_enforcement(object, other_proc=nil) | |
@utf8_proc ||= Proc.new do |o| | |
o.force_encoding("UTF-8") if o.is_a?(String) | |
other_proc.call(o) if other_proc | |
o | |
end | |
load_without_utf8_enforcement(object, @utf8_proc) | |
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
1.8.7 :001 > ["asdf"].to_s | |
=> "asdf" | |
1.9.3p125 :001 > ["asdf"].to_s | |
=> "[\"asdf\"]" | |
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
class ActiveSupport::TestCase | |
def self.mark_19_incompat | |
@marked_19_incompat = true | |
end | |
def self.ruby_19_compatible? | |
!@marked_19_incompat | |
end | |
def run_with_19(*args, &block) |
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
class Module | |
def wrap_methods(*args) | |
methods = args | |
feature = args.pop | |
wrapper = "_#{feature}_wrapper" | |
methods.each do |method| | |
alias_method_chain(method, feature) do |aliased_target, punctuation| | |
original_method = "#{aliased_target}_without_#{feature}#{punctuation}" | |
class_eval <<-EOL | |
def #{aliased_target}_with_#{feature}#{punctuation}(*args, &block) |
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
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp | |
index 88f48e3..0f36817 100644 | |
--- a/scripting/engine_spidermonkey.cpp | |
+++ b/scripting/engine_spidermonkey.cpp | |
@@ -662,6 +662,9 @@ namespace mongo { | |
case CodeWScope: { | |
JSFunction * func = compileFunction( e.codeWScopeCode() ); | |
+ if ( !func ) | |
+ return JSVAL_NULL; |
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
$j.ajax( | |
{ | |
type: 'POST', | |
url: '/proxy/direct', | |
data: | |
{ | |
url: "http://www.outbound.com", | |
body: $j.param({a: "bar", b: "buz"}), | |
contenttype: "application/x-www-form-urlencoded" | |
} |