Skip to content

Instantly share code, notes, and snippets.

~/tmp/chef/chef-repo/server-setup $ cap chef:configure_clients
* executing `chef:configure_clients'
servers: ["dhcp-223.lkb.upmc.fr"]
** scp upload solo.rb -> /tmp/solo.rb
[dhcp-223.lkb.upmc.fr] solo.rb
* scp upload complete
servers: ["dhcp-223.lkb.upmc.fr"]
** scp upload #<StringIO:0xb76f8094> -> /tmp/chef.json
[dhcp-223.lkb.upmc.fr] /tmp/chef.json
* scp upload complete
#preseed.cfg
#--------------------------
# Local sets language and country.
# Should be set in boot parameter, but just in case...
d-i debian-installer/locale string en_US
# Keyboard selection.
# Disable automatic (interactive) keymap detection.
#!/bin/bash -x
#run installer with
# wget tiny.cc/chefconfig; bash -x install.sh role
# role is a json file that describes a roles or runlist to execute.
# download files to /tmp directory
export REPO=/tmp/chef-repo
# either run role supplied as argument, or test.json as default
export VPS=YOUR.IP.ADDRESS.HERE
function initialize {
rm .ssh/known_hosts
server=${1:=${VPS}}
role=$2
: ${role:=rails}
ssh-copy-id -i ~/.ssh/id_rsa root@$server
ssh root@$1 "wget http://github.com/sid137/chef-repo/raw/master/install.sh -O install.sh && /bin/bash -x install.sh ${role}"
defaults: &defaults
host: 127.0.0.1
development:
<<: *defaults
database: test_dev
test:
<<: *defaults
database: test_test
module Devise
module Orm
module MongoMapper
module Hook
def devise_modules_hook!
extend Schema
include Compatibility
yield
return unless Devise.apply_schema
devise_modules.each { |m| send(m) if respond_to?(m, true) }
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Ohai Attribute: uptime_seconds - 21470
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Ohai Attribute: platform - "ubuntu"
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Platform is ubuntu version 9.10
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Compiling recipes for node i7
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Loading cookbook openssl library file: /tmp/chef-solo/cookbooks/openssl/libraries/secure_password.rb
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Loading cookbook packages library file: /tmp/chef-solo/cookbooks/packages/libraries/packages.rb
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Loading attributes from /tmp/chef-solo/cookbooks/apache2/attributes/apache.rb
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Loading attributes from /tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Not setting bootstrap/chef/url_type to "http" because it has a default value already
[Sat, 03 Apr 2010 19:29:29 +0200] DEBUG: Not setting bootstrap/chef/init_st
@sid137
sid137 / gist:736492
Created December 10, 2010 17:27
SnipMate
"""""""""""""""""""""""""""""""""""""""""""""
""Snipmate Mod
"""""""""""""""""""""""""""""""""""""""""""""
" Reload snippets and close snippet buffer on snippet save
autocmd BufWritePost *.snippet :call ReloadAllSnippets() | :Bclose
"shortcuts to quickly create new snippet
map <Leader>ca :call MakeSnippet()<CR>
imap <Leader>ca <ESC> :call MakeSnippet()<CR>
@sid137
sid137 / test.coffee
Created April 9, 2011 03:55
.vimrc
" Many settings taken from
" http://nvie.com/posts/how-i-boosted-my-vim/
"
" Most general settings first
set nocompatible " Set Vim rather than Vi settings; must go first
set noeb " Set no audio or visual error beep
set bs=2
set bs=indent,eol,start " Allow backspacing over everything in insert mode
set history=1000 " Keep 1000 lines of command line history
set undolevels=1000
(function() {
var bitlist, kids, singers, song;
song = ["do", "re", "mi", "fa", "so"];
singers = {
Jagger: "Rock",
Elvis: "Roll"
};
bitlist = [1, 0, 1, 0, 0, 1, 1, 1, 0];
kids = {
brother: {