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 Model < ParentModel | |
include Foo::Bar | |
extend Bar::Baz | |
acts_as_authentic | |
dsl_specific_flags | |
module InternalModule | |
... | |
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
{ | |
"zonename": "17a296aa-012c-49bb-a10a-e6d48a06093d", | |
"autoboot": true, | |
"brand": "kvm", | |
"limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session", | |
"v": 1, | |
"create_timestamp": "2013-08-09T04:26:57.316Z", | |
"cpu_shares": 100, | |
"zfs_io_priority": 100, | |
"max_lwps": 2000, |
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
module Let | |
def let(name, &block) | |
ivar = "@#{name}".to_sym | |
if instance_variable_defined?(ivar) | |
instance_variable_get(ivar) | |
else | |
instance_variable_set(ivar, instance_eval(&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
context "deep copy some record" do | |
it do | |
duplicate = call_the_copy_method(original) | |
check_same = lambda { |&block| expect(block.call(duplicate)).to eq(block.call(original)) } | |
check_same.call { |x| x.name } | |
check_same.call { |x| x.list_of_shared_items } | |
check_same.call { |x| x.list_of_copied_items.map { |item| item.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
# near the top of spec_helper.rb | |
# clear the test log file before we start. | |
log_file = Rails.root.join("log/test.log") | |
File.truncate(log_file, 0) if File.exist?(log_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
# The si3124 card doesn't seem to like drives being hot plugged, so manually deactivate the ports | |
cfgadm -x sata_port_deactivate sata1/0 sata1/1 sata1/2 sata1/3 | |
# enable hot plug service | |
svcadm enable hotplug | |
# connect the drives, and: | |
cfgadm -x sata_port_activate sata1/0 sata1/1 sata1/2 sata1/3 | |
# they should connect and configure automatically now, if not: | |
cfgadm -c configure sata1/0 | |
cfgadm -c configure sata1/1 | |
cfgadm -c configure sata1/2 |
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
#!/bin/bash | |
# | |
# use mac FileMerge (opendiff) to view differences to a file. | |
# | |
# usage: svn_od <filename> | |
# | |
# works with absolute and relative paths to files. | |
# | |
function svn_od { | |
DIR=`dirname "$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
*.pbxproj -crlf -diff -merge |
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
# The line below sets some DEFAULT, starting with Netatalk 2.1. | |
:DEFAULT: options:upriv,usedots | |
# The "~" below indicates that Home directories are visible by default. | |
# If you do not wish to have people accessing their Home directories, | |
# please put a pound sign in front of the tilde or delete it. | |
~ cnidscheme:dbd options:usedots,invisibledots,upriv fperm:0660 dperm:0770 | |
/MacBackup/Archives "Archives" cnidscheme:dbd options:usedots,invisibledots,upriv,tm fperm:0660 dperm:0770 | |
/MacBackup/TimeMachine "TimeMachine" cnidscheme:dbd options:usedots,invisibledots,upriv,tm fperm:0660 dperm:0770 |
OlderNewer