Skip to content

Instantly share code, notes, and snippets.

View jespada's full-sized avatar

jespada jespada

View GitHub Profile
@jespada
jespada / Vagrantfile
Created May 27, 2014 15:03
vagrant-file jenkins jobs
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# use vagrant-omnibus to install chef
config.omnibus.chef_version = :latest
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@jespada
jespada / error.log
Created May 23, 2014 21:30
api.berkshelf.com
Error retrieving universe from source: https://api.berkshelf.com
* [Berkshelf::APIClient::ServiceUnavaiable] service unavailable at: https://api.berkshelf.com
E, [2014-05-23T21:28:13.076316 #12560] ERROR -- : Actor crashed!
NoMethodError: undefined method `cookbook' for nil:NilClass
/var/lib/jenkins/.rvm/gems/ruby-2.0.0-p481@tmux-cookbook-0/gems/berkshelf-3.1.2/lib/berkshelf/installer.rb:95:in `install'
/var/lib/jenkins/.rvm/gems/ruby-2.0.0-p481@tmux-cookbook-0/gems/celluloid-0.16.0.pre/lib/celluloid/calls.rb:26:in `public_send'
/var/lib/jenkins/.rvm/gems/ruby-2.0.0-p481@tmux-cookbook-0/gems/celluloid-0.16.0.pre/lib/celluloid/calls.rb:26:in `dispatch'
/var/lib/jenkins/.rvm/gems/ruby-2.0.0-p481@tmux-cookbook-0/gems/celluloid-0.16.0.pre/lib/celluloid/calls.rb:63:in `dispatch'
/var/lib/jenkins/.rvm/gems/ruby-2.0.0-p481@tmux-cookbook-0/gems/celluloid-0.16.0.pre/lib/celluloid/cell.rb:60:in `block in invoke'
/var/lib/jenkins/.rvm/gems/ruby-2.0.0-p481@tmux-cookbook-0/gems/celluloid-0.16.0.pre/lib/celluloid/c
@jespada
jespada / .kitchen.local.yml
Created May 13, 2014 19:38
.kitchen.local with docker
---
driver:
name: docker
privileged: true
provisioner:
name: chef_zero
platforms:
- name: ubuntu-14.04
driver_config:
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
docker ps -a | awk '$2 ~ "[0-9a-f]{12}" {print $'$1'}'
}
@jespada
jespada / chef-dk
Created April 24, 2014 15:02
chef-dk pak
➜ ~ ls -l /usr/bin/ | grep chefdk
lrwxrwxrwx 1 root root 21 apr 16 13:31 berks -> /opt/chefdk/bin/berks
lrwxrwxrwx 1 root root 20 apr 16 13:31 chef -> /opt/chefdk/bin/chef
lrwxrwxrwx 1 root root 26 apr 16 13:31 chef-apply -> /opt/chefdk/bin/chef-apply
lrwxrwxrwx 1 root root 27 apr 16 13:31 chef-client -> /opt/chefdk/bin/chef-client
lrwxrwxrwx 1 root root 26 apr 16 13:31 chef-shell -> /opt/chefdk/bin/chef-shell
lrwxrwxrwx 1 root root 25 apr 16 13:31 chef-solo -> /opt/chefdk/bin/chef-solo
lrwxrwxrwx 1 root root 25 apr 16 13:31 chef-zero -> /opt/chefdk/bin/chef-zero
lrwxrwxrwx 1 root root 23 apr 16 13:31 fauxhai -> /opt/chefdk/bin/fauxhai
lrwxrwxrwx 1 root root 26 apr 16 13:31 foodcritic -> /opt/chefdk/bin/foodcritic
@jespada
jespada / chef-dk
Created April 24, 2014 15:02
chef-dk pak
➜ ~ ls -l /usr/bin/ | grep chefdk
lrwxrwxrwx 1 root root 21 apr 16 13:31 berks -> /opt/chefdk/bin/berks
lrwxrwxrwx 1 root root 20 apr 16 13:31 chef -> /opt/chefdk/bin/chef
lrwxrwxrwx 1 root root 26 apr 16 13:31 chef-apply -> /opt/chefdk/bin/chef-apply
lrwxrwxrwx 1 root root 27 apr 16 13:31 chef-client -> /opt/chefdk/bin/chef-client
lrwxrwxrwx 1 root root 26 apr 16 13:31 chef-shell -> /opt/chefdk/bin/chef-shell
lrwxrwxrwx 1 root root 25 apr 16 13:31 chef-solo -> /opt/chefdk/bin/chef-solo
lrwxrwxrwx 1 root root 25 apr 16 13:31 chef-zero -> /opt/chefdk/bin/chef-zero
lrwxrwxrwx 1 root root 23 apr 16 13:31 fauxhai -> /opt/chefdk/bin/fauxhai
lrwxrwxrwx 1 root root 26 apr 16 13:31 foodcritic -> /opt/chefdk/bin/foodcritic
@jespada
jespada / .gitconfig
Created April 11, 2014 12:09
git global config
[user]
email = espada.jorge@gmail.com
name = Jorge Espada
[push]
default = current
[color]
ui = auto
branch = auto
diff = auto
interactive = auto
@jespada
jespada / view1.js
Created March 25, 2014 13:36
view.js double click
var self = this;
this.clickFocusable = true;
this.el.dblclick(function() {
if (self.clickFocusable) {
self.focus();
}
});
};
types.View = View;
@jespada
jespada / git.config
Created February 25, 2014 06:59
git nice log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
@jespada
jespada / mate.py
Created December 21, 2013 18:22
test robot
import rg
class Robot:
def act(self, game):
# if we're in the center, stay put
if self.location == rg.CENTER_POINT:
return ['guard']
# if there are enemies around, attack them
for loc, bot in game.robots.iteritems():