Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jpablobr's full-sized avatar

Pablo Barrantes jpablobr

View GitHub Profile
xcnm,,,vv fjflkasjdf;lasj op''njA X (}Nc afv .lvco /b[piçkfkfk
@jpablobr
jpablobr / keymap_guillotine.c
Created December 26, 2017 03:02
An Atreus right-handed layout designed mostly to reduce wrist and pinky RSI
#include "keymap_common.h"
/* An Atreus right-handed layout designed mostly to reduce wrist and pinky RSI
* by helping you to stay closer to home-row.
*
* This is achieved mostly by relying significantly on dual-role keys, but only
* on the less used or non-alphanumeric ones to avoid conflicts or activating
* incorrect key-codes when speed typing. The SHIFT dual-role keys are probably
* the most problematic ones (i.e., typing "za" might end up sending "A") but,
* again, "Z" isn't really a commonly used letter in English and in worst case
@jpablobr
jpablobr / gitflow-breakdown.md
Created September 29, 2017 04:58 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

# for more info: https://gist.github.com/1120938
@jpablobr
jpablobr / gifs.rb
Last active December 10, 2015 17:08
This script will parse all @gifs tweets searching for gifs urls and download them.
#!/usr/bin/env ruby
# This script will parse all @gifs tweets searching for gifs urls and
# download them.
# Initial disclaimer!
# This mess is gonna get raw, like sushi. So haters to the left.
# Usage:
# $ git clone https://gist.github.com/4465778.git gifs
@jpablobr
jpablobr / tork_tcp.rb
Created February 14, 2012 23:57
Tork TCP notifications
require 'socket'
require 'tork/config'
require 'set'
failed_test_files = Set.new
socket = TCPSocket::new("localhost", 5000)
Config.test_event_hooks.push lambda {|message|
event, test_file, line_numbers, log_file = message
@jpablobr
jpablobr / tork_wrong_number_of_arguments.log
Created January 29, 2012 19:19
debugging tork with RUBYOPT=-d
jp@d: M|114m|master ttycoke RUBYOPT=-d tork
Exception `LoadError' at /home/jpablobr/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1243 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /home/jpablobr/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1252 - cannot load such file -- rubygems/defaults/ruby
/home/jpablobr/.rvm/gems/ruby-1.9.3-p0/gems/tork-17.0.1/bin/tork:59: warning: assigned but unused variable - worker_number
Exception `NoMethodError' at /home/jpablobr/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1473 - undefined method `to_ary' for #<Gem::Specification name=json version=1.6.4>
Exception `NoMethodError' at /home/jpablobr/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1473 - undefined method `to_ary' for #<Gem::Specification name=json version=1.6.5>
Using Ext extension for JSON.
tork: Absorbing test execution overhead...
Exception `LoadError' at /home/jpablobr/.rvm/rub
@jpablobr
jpablobr / curl_http_status.sh
Created January 27, 2012 00:23
curl for http status
#!/bin/sh
curl -sL -w "%{http_code}\\n" "http://website.com" -o /dev/null
E, [2012-01-03T20:08:09.057063 #25088] ERROR -- : file not found -- in reply to #<Rumai::IXP::Twalk:0x8d24314 @fields=[#<Rumai::IXP::Struct::Field:0x853d1dc @name=:tag, @format=2, @countee=nil, @counter=nil>, #<Rumai::IXP::Struct::Field:0x8693194 @name=:fid, @format=4, @countee=nil, @counter=nil>, #<Rumai::IXP::Struct::Field:0x8692cd0 @name=:newfid, @format=4, @countee=nil, @counter=nil>, #<Rumai::IXP::Struct::Field:0x869280c @name=:nwname, @format=2, @countee=#<Rumai::IXP::Struct::ClassField:0x8692348 @name=:wname, @format=String, @countee=nil, @counter=#<Rumai::IXP::Struct::Field:0x869280c ...>>, @counter=nil>, #<Rumai::IXP::Struct::ClassField:0x8692348 @name=:wname, @format=String, @countee=nil, @counter=#<Rumai::IXP::Struct::Field:0x869280c @name=:nwname, @format=2, @countee=#<Rumai::IXP::Struct::ClassField:0x8692348 ...>, @counter=nil>>], @values={:fid=>0, :newfid=>5, :wname=>["lbar", "1"], :tag=>5}> (Rumai::IXP::Error)
/home/jpablobr/.rvm/gems/ruby-1.9.3-p0/gems/rumai-4.1.3/lib/rumai/ixp/transport.rb:15
@jpablobr
jpablobr / 1_oo.rb
Created November 20, 2011 00:36 — forked from rbxbx/1_oo.rb
Bootstrapping a lightweight Object System in Ruby
class Person
def initialize(name, age)
@name = name
@age = age
end
def set_name(new_name)
@name = new_name
end