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
GC.disable | |
objects = ObjectSpace.count_objects | |
start = objects[:TOTAL] | |
puts "objects: #{start}" # => 9811 | |
1_000_000.times do | |
"I am a lonly" + " concatenated" + " string" + "." | |
end | |
end_objects = ObjectSpace.count_objects(objects)[:TOTAL] | |
puts "objects: #{end_objects}" # => ? | |
puts "difference: #{end_objects - start}" # => ? |
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
(defun ruby-send-region (start end) | |
"Send the current region to the inferior Ruby process." | |
(interactive "r") | |
(let (term (file (buffer-file-name)) line) | |
(save-excursion | |
(save-restriction | |
(widen) | |
(goto-char start) | |
(setq line (+ start (forward-line (- start)) 1)) | |
(goto-char start) |
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
#RVM settings | |
if [[ -s ~/.rvm/scripts/rvm ]] ; then | |
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" | |
fi | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
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
function(keys, values, rereduce) { | |
if (rereduce) { | |
var result = []; | |
values.forEach(function(valueGroup){ | |
valueGroup.forEach(function(value){ | |
result.push(value); | |
}); | |
}); | |
return result; | |
} else { |
NewerOlder