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
# based on http://tatey.com/2012/02/07/mocking-with-minitest-mock-and-simple-delegator/ | |
class Order < ActiveRecord::Base | |
# … | |
end | |
class MyController < ApplicationController | |
def index | |
@orders = Order.find(:all) | |
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
# Interesting relationships: | |
# Say the father's age is 72 and the son's age is 40. | |
# The father was born in 1940 and the son in 1972. | |
# Isn't that curious? | |
# In english, the dad's age is the current year minus the dad's birth year, | |
# the right-most 2 digits of the dad's birth year is the son's age, |
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
# to be used only for local debugging | |
LK_ENABLE_TRACE = false | |
if LK_ENABLE_TRACE && Rails.env.development? | |
require 'thread' | |
class LkTracer | |
def initialize |
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' | |
gemspec |
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
set "STEAMHOME=F:\games\steam\steamapps\common" | |
rem =========================== mods ========================= | |
rem Latest mod versions as of 10/16/2013: | |
rem CBA*: Community Base Addons CBA_v1.0.0pre10.7z: http://dev-heaven.net/attachments/download/19512/CBA_v1.0.0pre10.7z | |
rem ASR_AI: Improved AI @ASR_AI_v1_16_1.7z: http://www.armaholic.com/page.php?id=12105&a=dl | |
rem ACEX_SM: Improved Sound Effects @ACEX_SM_v1.13.0.100.7z: http://www.armaholic.com/page.php?id=12160&a=dl | |
rem Blastcore: Better Explosions @Blastcore_Visuals_R1.2.rar: http://www.armaholic.com/page.php?id=12975&a=dl | |
rem sthud: Situational Awareness 121209_sthud_islandfree.7z: http://www.armaholic.com/page.php?id=9936&a=dl |
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
Show hidden characters
[ | |
{ "keys": ["f8"], "command": "p4_edit" } | |
] |
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
pathadd() { | |
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then | |
PATH="${PATH:+"$PATH:"}$1" | |
fi | |
} | |
pathoverride() { | |
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then | |
PATH="$1${PATH:+":$PATH"}" | |
fi |
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
$ irb | |
ruby-1.9.2-p180 :001 > "“" | |
=> "“" | |
ruby-1.9.2-p180 :002 > "“".encoding | |
=> #<Encoding:UTF-8> | |
ruby-1.9.2-p180 :003 > "\“" | |
SyntaxError: (irb):7: invalid multibyte char (UTF-8) | |
(irb):7: invalid multibyte char (UTF-8) | |
from /local/rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>' |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"font_size": 11, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"hot_exit": false, |
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/random.c b/random.c | |
index e669e98..9334921 100644 | |
--- a/random.c | |
+++ b/random.c | |
@@ -521,7 +521,7 @@ fill_random_bytes_syscall(void *seed, size_t size, int unused) | |
CryptGenRandom(prov, size, seed); | |
return 0; | |
} | |
-#elif defined __linux__ && defined SYS_getrandom | |
+#elif defined __linux__ && defined __NR_getrandom |