Skip to content

Instantly share code, notes, and snippets.

View peleteiro's full-sized avatar
🏠
Working from home

Jose Peleteiro peleteiro

🏠
Working from home
View GitHub Profile
@peleteiro
peleteiro / gist:318e3d3194f4738d5257
Created January 20, 2016 23:40 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
presets:
global:
torrent_alive: yes
seen: local # We don't want accepted movies on this feed to affect actual download feed
download:
path: /c/media/BitTorrent/sources
overwrite: no
notifications:
rapidpush:
@peleteiro
peleteiro / robot.js
Created December 3, 2012 01:00
Pelebot
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
//robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if Chef::Config[:solo]
class Chef
module Mixin
module Language
def data_bag(bag)
@solo_data_bags = {} if @solo_data_bags.nil?
unless @solo_data_bags[bag]
@solo_data_bags[bag] = {}
Dir.glob(File.join(Chef::Config[:data_bag_path], bag,
@peleteiro
peleteiro / url_dsl.rb
Created December 14, 2009 19:26 — forked from defunkt/url_dsl.rb
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json
# http://unicorn.bogomips.org/SIGNALS.html
rails_env = ENV['RAILS_ENV'] || 'production'
rails_root = ENV['RAILS_ROOT'] || "/data/github/current"
God.watch do |w|
w.name = "unicorn"
w.interval = 30.seconds # default
# unicorn needs to be run from the rails root
#!/usr/bin/env ruby
$:.unshift File.dirname(__FILE__)+"/../lib"
require 'mongomapper'
require 'irb'
IRB.setup(nil)
irb = IRB::Irb.new
IRB.conf[:MAIN_CONTEXT] = irb.context