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
2.0.0 (main):0 > Genre.new.my_transation_method | |
nil | |
2.0.0 (main):0 > Genre.last | |
nil | |
2.0.0 (main):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
t = Thread.new do | |
pid = fork do | |
puts "I'm the child #{Process.pid}" | |
raise 'hello' | |
end | |
puts "Thread #{Thread.current.inspect}, pid: #{pid.inspect}" | |
puts "I'm the parent #{Process.pid}" | |
Process.waitpid(pid) | |
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
t = Thread.new do | |
pid = fork do | |
raise 'hello' | |
end | |
Process.waitpid(pid) | |
end | |
t.join |
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 | |
raise RuntimeError, "testing child exception" | |
end | |
pid, status = Process.wait2 child | |
puts status.inspect |
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
begin | |
require 'zurb-foundation' | |
rescue MissingSourceFile | |
# doing a rescue here as Zurb is Rails3-oriented, and so it will try to load | |
# Rails 3 style generators, etc. We don't need that, we only need the | |
# frameworks and includes | |
end | |
# Add all registered frameworks to Sass's load path to make them available | |
# through @imports |
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
#!/usr/bin/bash | |
mysql -B -N $@ -e "SELECT DISTINCT CONCAT( | |
'SHOW GRANTS FOR ''', user, '''@''', host, ''';' | |
) AS query FROM mysql.user" | \ | |
mysql $@ | \ | |
sed 's/\(GRANT .*\)/\1;/;s/^\(Grants for .*\)/## \1 ##/;/##/{x;p;x;}' |
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 AppData | |
#require 'deep_symbolizable' | |
# again - it's a singleton, thus implemented as a self-extended module | |
extend self | |
@_settings = {} | |
attr_reader :_settings |
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 MIT License (MIT) | |
Copyright (c) 2015 Oleg Ivanov http://github.com/morhekil | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
--- tidybuf.rb 2007-04-10 09:09:01.000000000 -0500 | |
+++ tidybuf.rb.patched 2007-04-10 09:08:55.000000000 -0500 | |
@@ -11,6 +11,7 @@ | |
# Mimic TidyBuffer. | |
# | |
TidyBuffer = struct [ | |
+ "int* allocator", | |
"byte* bp", | |
"uint size", | |
"uint allocated", |
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
From 89c418f2734e89e902aca2111ad7e3e6186db907 Mon Sep 17 00:00:00 2001 | |
From: Robin Lu <iamawalrus@gmail.com> | |
Date: Tue, 8 Jul 2008 16:06:33 +0800 | |
Subject: [PATCH] fix build on mac os x | |
--- | |
src/Makefile.am | 2 +- | |
src/network.c | 167 ----------------------------------------------- | |
src/network_backends.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++ | |
3 files changed, 170 insertions(+), 168 deletions(-) |