Skip to content

Instantly share code, notes, and snippets.

Working from 🇵🇾

Emilio Blanco emilioeduardob

Working from 🇵🇾
  • Paraguay
Block or report user

Report or block emilioeduardob

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
emilioeduardob /
Last active Feb 17, 2018 — forked from johanndt/
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu


Install Postgres 9.5, and then:

export LC_CTYPE=en_US.UTF-8; export LC_ALL=en_US.UTF-8
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
emilioeduardob / ruby.json
Created Sep 25, 2017
ActiveAdmin Snippets for VScode
View ruby.json
"ActiveAdmin Form": {
"prefix": "admin_form",
"body": [
"form do |f|",
"\tf.inputs \"Details\" do",
"\t\tf.input :$1",
View select_2_spec.rb
require "rails_helper"
describe "Select 2", type: :feature do
def create_invoice_with_categories
Category.where(name: "Cat #1", description: "Desc 1").first_or_create!
cat = Category.where(name: "Cat #2", description: "Desc 2").first_or_create!
Invoice.first_or_create!(category: cat)
def create_invoice_with_city
View gist:177c3758215bdc22958a5b6d9ae75431
socat -d TCP-LISTEN:2376,range=,reuseaddr,fork UNIX:/var/run/docker.sock
curl localhost:2376/version
emilioeduardob / mailman_capistrano.rb
Last active Sep 29, 2016 — forked from inbeom/mailman_capistrano.rb
Capistrano recipe for Mailman
View mailman_capistrano.rb
set :mailman_cmd, -> { "#{fetch(:bundle_cmd, 'bundle')} exec mailman" }
set :mailman_config, -> { "#{current_path}/config/mailman.rb" }
set :mailman_role, -> { :app }
set :mailman_pid, -> { "#{current_path}/tmp/pids/" }
namespace :mailman do
desc 'Stop mailman'
task :stop do
on roles(:app) do
execute "if [ -d #{current_path} ] && [ -f #{fetch(:mailman_pid)} ] && kill -0 `cat #{fetch(:mailman_pid)}` > /dev/null 2>&1; then cd #{current_path} && rm #{fetch(:mailman_pid)} ; else echo 'Mailman is not running'; fi"
emilioeduardob / snippets.cson
Created Apr 20, 2016
My rails snippets for Atom
View snippets.cson
'prefix': 'service'
'body': """
class ${1:ServiceName}
attr_reader :${2:param}
def initialize(${2:param})
@${2:param} = ${2:param}
emilioeduardob / PushNotifications.js
Last active Aug 29, 2015
AngularJS Service for phonegap PushPlugin
View PushNotifications.js
.factory("PushNotifications", function($cordovaPush, $rootScope){
var msgCallback;
var regCallback;
var errorCallback;
var gcmSenderId;
var service = {
setGcmSenderId: setGcmSenderId,
emilioeduardob / .vimrc.after
Created Sep 12, 2014
My custom projections
View .vimrc.after
let g:rails_projections = {
\ "config/projections.json": {
\ "command": "projections"
\ },
\ "app/services/*.rb": {
\ "command": "service",
\ "affinity": "model",
\ "test": "spec/services/%s_spec.rb",
\ "related": "app/models/%s.rb",
\ "template": "class %S\n\n def run\n end\nend"
View wkhtmltopdf.tablesplit.js
* WkHtmlToPdf table splitting hack.
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
* The tables you want to be automatically splitted when the page ends must
* have a class name of "splitForPrint" (can be changed).
emilioeduardob / gitproxy-socat
Created Oct 9, 2012 — forked from sit/gitproxy-socat
A simple wrapper around socat to use as a git proxy command
View gitproxy-socat
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
# More details at
You can’t perform that action at this time.