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
tar(bsdtar): manipulate archive files | |
First option must be a mode specifier: | |
-c Create -r Add/Replace -t List -u Update -x Extract | |
Common Options: | |
-b # Use # 512-byte records per I/O block | |
-f <filename> Location of archive | |
-v Verbose | |
-w Interactive | |
Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ] | |
<file>, <dir> add these items to archive |
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
guard 'rspec', :cli => "--color --format nested", :notification => true do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { "spec" } | |
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
function instance_role { | |
grep instance_role /etc/chef/dna.json |awk -F\" '{print $4}' | |
} | |
function instance_id { | |
grep this /etc/chef/dna.json |awk -F\" '{print $4}' | |
} | |
function public_hostname { | |
ohai |grep public_hostname | awk -F\" '{print $4}' | |
} | |
function instance_name { |
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
jQuery(function($) { | |
var customFieldParam = /^ticket\[fields\]\[(\d+)\]$/, | |
urlParams = $.queryParameters(), | |
k, match, fieldID; | |
// for each URL parameter: | |
for (k in urlParams) { | |
if (urlParams.hasOwnProperty(k)) { | |
// check whether it's a Zendesk custom field |
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
➜ rubinius git:(master) bin/mspec spec/ruby/core/proc | |
rubinius 2.0.0dev (1.8.7 c8a4b1ee yyyy-mm-dd JI) [x86_64-apple-darwin11.1.0] | |
..............................................................F...... | |
1) | |
Proc.new with an associated block called on a subclass of Proc using a reified block parameter returns an instance of the subclass FAILED | |
Expected Proc | |
to equal #<Class:0x1d64> | |
/expectations.rb:15 |
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
# JRUBY-5026 | |
describe "using a reified block parameter" do | |
it "returns an instance of the subclass" do | |
cls = Class.new do | |
def self.subclass=(subclass) | |
@subclass = subclass | |
end | |
def self.foo(&block) | |
@subclass.new(&block) | |
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
rubinius 2.0.0dev (1.8.7 c8a4b1ee yyyy-mm-dd JI) [x86_64-apple-darwin11.1.0] | |
Listing specs tagged with 'fails' | |
Actor.link sends an exit message to linked Actors | |
Actor#notify_exited kills actors not trapping exits | |
Actor#notify_exited delivers a message to an actor trapping exits | |
Actor.spawn creates functioning actors | |
VMActor::Container#spawn_actor creates Actors on remote VMs | |
The -x command line option runs code after the first /#!.*ruby.*/-ish line in target file |
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
if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("1.9") | |
s.add_dependency "SystemTimer" | |
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
/* | |
* Please take note of the following when using this JavaScript snippet: | |
* | |
* 1. It's provided as is, is not an officially support Zendesk widget | |
* no matter whom the author may be working for. | |
* 2. You are very welcome to fork this, in fact I encourage it if you | |
* have some awesome changes! | |
* 3. You'll notice a short delay before the permalinks display or indeed | |
* before the page scrolls to the permalink location. This is intended. | |
* |
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
if Gem::VERSION >= "1.3.6" | |
module Rails | |
class GemDependency | |
def requirement | |
r = super | |
(r == Gem::Requirement.default) ? nil : r | |
end | |
end | |
end | |
end |