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
def meth1 | |
puts "method start" | |
pr = lambda { return } | |
pr.call | |
puts "method end" | |
end | |
def meth2 |
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
ls -al /usr/share/locale/ru_RU.UTF-8/ | |
total 12 | |
drwxr-xr-x 8 root 272 2010-02-26 12:51 ./ | |
drwxr-xr-x 239 root 8126 2010-03-30 08:52 ../ | |
lrwxr-xr-x 1 root 28 2010-02-26 12:51 LC_COLLATE -> ../la_LN.US-ASCII/LC_COLLATE | |
lrwxr-xr-x 1 root 17 2010-02-26 12:51 LC_CTYPE -> ../UTF-8/LC_CTYPE | |
drwxr-xr-x 4 root 136 2009-05-18 21:19 LC_MESSAGES/ | |
-r--r--r-- 1 root 40 2009-05-18 21:19 LC_MONETARY | |
lrwxr-xr-x 1 root 25 2010-02-26 12:51 LC_NUMERIC -> ../ru_RU.CP866/LC_NUMERIC | |
-r--r--r-- 1 root 605 2009-05-18 21:19 LC_TIME |
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
preload_app true | |
GC.respond_to?(:copy_on_write_friendly=) and | |
GC.copy_on_write_friendly = true | |
before_fork do |server, worker| | |
# the following is highly recomended for Rails + "preload_app true" | |
# as there's no need for the master process to hold a connection | |
defined?(ActiveRecord::Base) and | |
ActiveRecord::Base.connection.disconnect! |
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/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
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
router:/etc # grep -r "ppp1" . | |
./sysconfig/SuSEfirewall2:# Examples: "ippp0 ippp1", "any dsl0" | |
./sysconfig/SuSEfirewall2:FW_DEV_INT="eth0 ppp0 ppp1 ppp2 ppp3 ppp4 ppp5 ppp6 ppp7 ppp8 ppp9" | |
## Type: string | |
# | |
# 3.) | |
# Which are the interfaces that point to the internal network? | |
# |
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
desc "Make new jammit assets path based on commit hash" | |
task :jammit do | |
run "cd #{current_path}; bundle exec jammit" | |
run "cd #{current_path}; bundle exec jammit-s3" | |
end | |
before "deploy:restart", "deploy:jammit" |
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/bash | |
# | |
# Sample .xinitrc for SuSE Linux | |
# This script is called from 'startx' when you start an X session | |
# | |
# | |
# In case everything goes wrong, we at least fall back to a plain xterm | |
# | |
failsafe="xterm -ls -T Failsafe -geometry 80x24-0-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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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
# Rake task to launch multiple Resque workers in development/production with simple management included | |
require 'resque/tasks' # Require Resque tasks | |
namespace :workers do | |
# = $ rake workers:start | |
# | |
# Launch multiple Resque workers with the Rails environment loaded, | |
# so they have access to your models, etc. |
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
--- central_logger/lib/central_logger/replica_set_helper.rb 2011-12-09 23:39:36.000000000 +0200 | |
+++ mongodb_logger/lib/mongodb_logger/replica_set_helper.rb 2011-12-09 23:39:55.000000000 +0200 | |
@@ -1,4 +1,4 @@ | |
-module CentralLogger | |
+module MongodbLogger | |
module ReplicaSetHelper | |
# Use retry alg from mongodb to gobble up connection failures during replica set master vote | |
# Defaults to a 10 second wait | |
@@ -16,4 +16,4 @@ | |
end |
OlderNewer