Skip to content

Instantly share code, notes, and snippets.

View elgalu's full-sized avatar

Leo Gallucci elgalu

View GitHub Profile
robertodecurnex / hello.rb
Last active August 29, 2015 14:02
Ruby Parser (Writing a Ruby to JS parser 5' demo)
class Pepe
def name
puts "Pepe"
message = "Hello "
spalladino /
Created May 23, 2012 11:45
Organizing coffeescript code in a Rails 3 app
if $('#my_div_in_complex_page').length > 0
class Foo
wacko / gist:4221847
Created December 6, 2012 04:48
Search Engine (shorcuts)
Google Maps (Ciudad de BsAs)
txus / .pryrc.rb
Last active December 18, 2015 17:59
Pry command to trace a method invocation and log backtraces of each invocation to a file.
def write_backtrace name, backtrace, filename
exceptions = Regexp.union([
backtrace.reject! { |line| line =~ exceptions }
MicahChalmer / .htaccess
Last active May 1, 2016 16:49
Scripts to set up Ruby 1.9.3 on a DreamHost shared hosting account via rbenv and ruby-build, and run a Rack app with it via FastCGI.
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On

This post has sat as a draft on my computer for well over a year now. I always intended to finish it, but am beyond caring. So I’m just going to publish it in its current form in hopes that it sparks some interesting conversation and avoids beating a dead horse.

Cucumber is a divisive tool. Some people absolutely love it and have an irrational dedication to using it for every single project. Others hate it, either because they haven’t tried it, or tried it on one project and ended up with a steaming pile of sh…step definitions.

I’ve been using cucumber since one of the first few releases. While I have been burned by it on projects, I also have a great appreciation for it.

What’s wrong with cucumber? Technically, nothing. It’s a brilliant tool for creating DSLs to test our applications. The problem with cucumber is YOU: you don’t understand why to use it, when to use it or how to use it. Don’t worry, though, it’s not entirely your fault. Many people are responsible f

dersam / behatbox
Created September 23, 2016 14:25
Start a docker machine for running tests via Webdriver with the elgalu/selenium container
#!/usr/bin/env bash
docker-machine start default
docker rm -f grid
docker run --rm --name=grid --add-host='' -p 4444:24444 -p 5920:25900 \
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.51.0b > /dev/null &
sleep 5
krmahadevan /
Created January 27, 2013 18:43
A simple servlet which basically issues a System.exit() when invoked. This servlet would have to be injected into the node [not the Grid] so that it can help in terminating the node.
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
* A simple servlet which basically issues a System.exit() when invoked.
* This servlet would have to be injected into the node [not the Grid] so that it can help in terminating the node.
renz45 / An_example.markdown
Last active December 4, 2016 21:01
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/user

christianchristensen /
Last active February 2, 2017 18:05
.jenkins.yml research and thoughts


Build configuration(s) closer to code; inspired by .travis.yml

  • Default yaml file to define a build that runs make test
  • Preserves No State Between Builds (runs all commands over SSH in isolated virtual machines)
  • The standard Unix exit code of "0" means the build passed; everything else is treated as failure.
  • Specify branches to build (whitelist, blacklist)
  • Secure environment variables (keys, configuration, ...)