Skip to content

Instantly share code, notes, and snippets.

View rhaamo's full-sized avatar
💭
squeak squeak

Valérianne rhaamo

💭
squeak squeak
View GitHub Profile
From b1de88b20b1cc206529964ea9de0fb8596104a4a Mon Sep 17 00:00:00 2001
From: Marc Lagrange <rhaamo@gruik.at>
Date: Tue, 9 Mar 2010 18:26:27 +0100
Subject: [PATCH] Add makefiles/Makefile.freebsd and modifications to Makefile to build on FreeBSD
---
Makefile | 9 ++
makefiles/Makefile.freebsd | 343 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 352 insertions(+), 0 deletions(-)
create mode 100755 makefiles/Makefile.freebsd
# crontab -u git -l
*/5 * * * * /home/git/aq3/cron.sh >> /home/git/aq3/log/cron.log
# cat /home/git/aq3/cron.sh
#!/bin/sh
# vim:set et sts=4 ts=4 tw=80:
echo "================================================="
echo "== Started: `date`"
echo "================================================="
cd /home/git/aq3
rake sshkeys:export
[DARWIN] rhaamo@melkor:ttys001 ~/dev/yespaste (git)-[master] % grep nif Gemfile
gem "nifty-generators"
[DARWIN] rhaamo@melkor:ttys001 ~/dev/yespaste (git)-[master] % rails --version
Rails 3.0.0.beta3
[DARWIN] rhaamo@melkor:ttys001 ~/dev/yespaste (git)-[master] % rails generate nifty:scaffold user_session --skip-model login:string password:string new destroy
/Users/rhaamo/.rvm/gems/ree-1.8.7-2010.01/gems/thor-0.13.6/lib/thor/core_ext/hash_with_indifferent_access.rb:26:in `[]=': can't modify frozen hash (TypeError)
from /Users/rhaamo/.rvm/gems/ree-1.8.7-2010.01/gems/thor-0.13.6/lib/thor/core_ext/hash_with_indifferent_access.rb:26:in `[]='
from /Users/rhaamo/.rvm/gems/ree-1.8.7-2010.01/gems/nifty-generators-0.4.0/lib/generators/nifty/scaffold/scaffold_generator.rb:51:in `initialize'
from /Users/rhaamo/.rvm/gems/ree-1.8.7-2010.01/gems/thor-0.13.6/lib/thor/group.rb:36:in `new'
from /Users/rhaamo/.rvm/gems/ree-1.8.7-2010.01/gems/thor-0.13.6/lib/thor/group.rb:36:in `start'
require 'rubygems'
d=Dir.new(Dir.pwd)
if d.include? "Gemfile"
load "~/.railsrc"
end
require 'pp'
require 'wirble'
Wirble.init
Wirble.colorize
# wrap 'b' to `bundle' if present
function b {
if which -s bundle>/dev/null; then
bundle $*
fi
}
[{"title"=>"Trash", "unread"=>0, "id"=>"Trash"},
{"title"=>"Sent", "unread"=>0, "id"=>"Sent"},
{"title"=>"WTF", "unread"=>0, "id"=>"WTF"},
{"title"=>"Lists",
"unread"=>0,
"id"=>"Lists",
"children"=>
[{"title"=>"Lists.LArverne", "unread"=>0, "id"=>"Lists:LArverne"},
{"title"=>"Lists.fbsd", "unread"=>0, "id"=>"Lists:fbsd", "children"=>[]}]}]
=> {"title"=>"foo", "children"=>{"title"=>"bar", "children"=>{"pony"=>"pink", "title"=>"baz"}}}
ree-1.8.7-2010.01 > a=[{"title" => "foo", "children" => [{"title" => "bar", "children" => [{"title" => "baz", "pony" => "pink"}]}]}]
ree-1.8.7-2010.01 > z
=> "foo.bar.baz"
ree-1.8.7-2010.01 > a.find {|s| s["title"] == "foo"}["children"].find {|s| s["title"] == "bar"}["children"].find {|s| s["title"] == "baz"}
=> {"pony"=>"pink", "title"=>"baz"}
#!/usr/bin/env python
def connect():
print "Connect called"
raise BaseException, "ERROR"
toto=0
while 1:
try:
% cat /usr/pkg/etc/thin/bavomatic.yml
---
pid: pids/thin.pid
timeout: 30
wait: 30
log: logs/thin.log
max_conns: 1024
require: []
rackup: bavomatic.ru
upstream bavomatic_cluster {
server unix:/tmp/thin.bavomatic.0.sock;
}
server {
include /usr/pkg/etc/nginx/compress;
listen 80;
server_name *.bavomatic.net bavomatic.net;