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
18930: Parent | |
18933: Child A | |
18934: Child B | |
18933: END in child if only exit called | |
18933: at_exit in child if only exit called | |
18933: parent END (only one) | |
18933: parent at_exit (2 times) | |
18933: parent at_exit (2 times) | |
18930: parent: child died | |
18930: parent trap(0) |
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
child = fork do | |
at_exit { $stderr.puts "Child one is done." } | |
exit # superfluous | |
end | |
Process.wait | |
$stderr.puts "Parent is done waiting for child one #{child}." | |
child = fork do | |
at_exit { $stderr.puts "This won't get hit." } | |
exit! |
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
Open git history for the file. | |
In annotate view, find the line of code and the sha. | |
Select history view and start typing the sha until it's selected. | |
Type 'esc', then down arrow. | |
Right-click and select "Annotate" - this will open the prior rev in the editor in annotate view. | |
Find that line of code and repeat. |
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/rake i18n:show_sample_dates_and_times['en-MY'] | |
time: | |
date : %m/%d/%Y : 2012-10-15 | |
date_day : %d : 15 | |
date_hour : %l:%M %p : 4:13 pm | |
date_month : %B : October | |
date_month_name : %B %e, %Y : 15 October 2012 | |
date_month_year : %B %Y : October 2012 | |
date_short_month_year : %e %b %Y : 15 Oct 2012 | |
date_short_year : %m/%d/%y : 15-10-12 |
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 file exists in both places: | |
git diff target_branch source_branch relative_path_to_file | git apply | |
If file is new on other branch: | |
git checkout source_branch relative_path_to_file | |
The checkout will work even if the file exists, and will stomp it, |
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
# converted to stand-alone script | |
require 'minitest/autorun' | |
require 'minitest/unit' | |
require 'stringio' | |
# fake out the logger | |
class Rails | |
@@logger = StringIO.new |
NewerOlder