Skip to content

Instantly share code, notes, and snippets.

View jespada's full-sized avatar

jespada jespada

View GitHub Profile
@jespada
jespada / sssh
Created December 7, 2011 20:08
little function that create a screen session on the remote host
# usage: sssh remotehost
# place it on your .bashrc
function sssh {
HOST=$1
SSH="/usr/bin/ssh"
echo "screen session on remote host $1 , press Ctrl+A d to dettach"
$SSH -t $HOST screen -xRR
}
@jespada
jespada / knife.rb
Created February 16, 2012 16:39 — forked from jtimberman/knife.rb
Commented knife.rb for all the things
# Knife Configuration File.
#
# This is a Ruby DSL to set configuration parameters for Knife's
# general options. The default location for this file is
# ~/.chef/knife.rb. If multiple Chef repositories are used,
# per-repository configuration files can be created. A per repository
# configuration file must be .chef/knife.rb in the base directory of
# the Chef repository. For example,
#
# ~/Development/chef-repo/.chef/knife.rb
@jespada
jespada / tmux.conf
Created February 29, 2012 23:40
My .tmux.conf
set -g prefix C-a
unbind %
bind | split-window -h
bind - split-window -v
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
# status bar
@jespada
jespada / tmux
Created March 6, 2012 20:12
jespada's tmmux Conf
##File ~/.tmux.conf
set -g prefix C-a
unbind %
bind | split-window -h
bind - split-window -v
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
@jespada
jespada / gist:2147919
Created March 21, 2012 14:56
lame vimrc
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
"" Whitespace
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab " use spaces, not tabs (optional)
@jespada
jespada / .tmux.conf
Created April 1, 2012 21:49
Tmux config
jespada@thor:~$ cat .tmux.conf
set -g prefix C-a
unbind %
bind | split-window -h
bind - split-window -v
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
set -g prefix C-a
unbind %
bind | split-window -h
bind - split-window -v
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
# status bar
@jespada
jespada / duckduckgo
Created April 13, 2012 02:38
emacs duckduckgo
;;DuckDuckgo search
(defun duckduckgo-search (text)
"Search DuckDuckGo from Emacs."
(interactive "sSearch: ")
(browse-url
(concat "https://duckduckgo.com/?q="
(replace-regexp-in-string " " "+" text))))
@jespada
jespada / erlang script
Created April 19, 2012 11:55
mnesia copy
%Copy al the tables at once
Node = mynodename, % node to copy these tables
StorageType = fun(T) -> mnesia:table_info(T, storage_type) end,
Tabs = mnesia:system_info(local_tables) -- [schema],
[mnesia:add_table_copy(Tab, Node, StorageType(Tab)) || Tab <- Tabs].
@jespada
jespada / jenkins
Created June 6, 2012 22:34
jenkis role
name "jenkins"
description "this role will install and setup jenkins main server"
run_list(
"recipe[java]",
"recipe[jenkins]",
"recipe[git]",
"recipe[maven]"
)