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
kenneth@jenny ~/tmp/dk/crond $ ./bin/crond start | |
kenneth@jenny ~/tmp/dk/crond $ ./bin/crond start | |
Process already running with id 28197 | |
kenneth@jenny ~/tmp/dk/crond $ ./bin/crond start | |
Process already running with id 28197 |
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
A testament [1] to Handsoap [2], while rewriting the postini gem [3]. This is from git log | |
$ git log --stat 2f91d4d6eaa8bd76c188f20929a19e456d1bb52e..HEAD | grep changed | |
2 files changed, 15 insertions(+), 4 deletions(-) | |
1 files changed, 38 insertions(+), 0 deletions(-) | |
2 files changed, 282 insertions(+), 1 deletions(-) | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
12 files changed, 9 insertions(+), 682 deletions(-) | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
8 files changed, 184 insertions(+), 3883 deletions(-) |
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
INSTRUCTIONS FOR USE | |
==================== | |
Generate the nanite agent | |
$ daemon_kit /path/to/daemon -i nanite_agent | |
Copy the above google.rb into lib/actors/ | |
Open libexec/daemon-daemon.rb and register the actor: |
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
# This task will only be ran once | |
task :foo do | |
unless fetch(:foo_completed, false) do | |
run "whoami" | |
set(:foo_completed, true) | |
end | |
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
require 'rubygems' | |
require 'eventmachine' | |
$i = 0 | |
EM.run { | |
3.times do |c| | |
EM.next_tick { | |
puts "#{c} : #{$i}" | |
$i += 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
require 'rubygems' | |
require 'timeout' | |
require 'mq' | |
10.times do |i| | |
puts "Run: #{i}" | |
em = Thread.new { EM.run } | |
q = MQ.queue("test#{i}") |
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
Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb:871 - no such file to load -- rubygems/defaults/operating_system | |
Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:35 - no such file to load -- Win32API | |
Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31 - no such file to load -- ffi | |
/usr/lib/ruby/gems/1.8/gems/ffi-0.3.5/lib/ffi/struct.rb:24: warning: method redefined; discarding old offset | |
Exception `LoadError' at /usr/lib/ruby/gems/1.8/gems/ffi-0.3.5/lib/ffi/library.rb:9 - Could not open library '/usr/lib/libuuid.so': /usr/lib/libuuid.so: invalid ELF header | |
Exception `LoadError' at /usr/lib/ruby/gems/1.8/gems/ffi-0.3.5/lib/ffi/library.rb:9 - Could not open library '/usr/lib/libuuid.so': /usr/lib/libuuid.so: invalid ELF header | |
Exception `LoadError' at /usr/lib/ruby/gems/1.8/gems/ffi-0.3.5/lib/ffi/library.rb:18 - Could not open any of [/usr/lib/libuuid.so] | |
/usr/lib/ruby/gems/1.8/gems/ffi-0.3.5/lib/ffi/library.rb:18:in `ffi_lib': Could no |
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
# steps I took | |
$ git clone [email protected]:kjwierenga/rufus-scheduler.git | |
$ cd rufus-scheduler | |
$ git branch -a | |
* master | |
origin/HEAD | |
origin/master | |
origin/twozero | |
$ git remote add upstream git://github.com/jmettraux/rufus-scheduler.git |
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 Linux | |
class User | |
class << self | |
# Generate an MD5 salt string | |
def salt | |
seeds = ('a'..'z').to_a | |
seeds.concat( ('A'..'Z').to_a ) | |
seeds.concat( (0..9).to_a ) |
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
<VirtualHost *:80> | |
ServerName foo.com | |
ServerAlias *.foo.com | |
# REST OF CONFIG | |
RailsAllowModRewrite on | |
RewriteCond %{HTTP_HOST} ^foo\.com [NC] | |
RewriteRule ^/(.*)$ http://www.foo.com/$1 | |
</VirtualHost> |