Skip to content

Instantly share code, notes, and snippets.

View thotmx's full-sized avatar

Hermes Ojeda Ruiz thotmx

  • México
View GitHub Profile
@thotmx
thotmx / oaxacarb.elm
Last active September 9, 2017 15:12
Simple Elm example for an Oaxaca.rb talk
import Html exposing (..)
import Html.Attributes exposing(placeholder)
import Html.Events exposing(onInput, onClick)
import Random exposing (..)
import Random.String
import Random.Char
type alias Model = {
content : String
}
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
@thotmx
thotmx / minitest_less_than_5.rb
Created May 1, 2015 21:32
Código de Inicio de Kata con Minitest < 5
require 'minitest/autorun'
class TestExample < MiniTest::Unit::TestCase
def test_example
assert_equal true, nil.nil?
end
end
@thotmx
thotmx / minitest_5.rb
Created May 1, 2015 21:29
Código de Inicio de Kata con Minitest versión 5
require 'minitest/autorun'
class TestExample < Minitest::Test
def test_example
assert_equal true, nil.nil?
end
end
@thotmx
thotmx / install_chrome_driver
Created March 21, 2015 06:12
Install chromedriver in Ubuntu (14.04)
$ sudo apt-get install chromium-chromedriver
$ sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver
@thotmx
thotmx / Install RMagick dependencies in Ubuntu
Last active August 29, 2015 14:11
Install RMagick Dependencies
$ sudo apt-get install imagemagick libmagickwand-dev
@thotmx
thotmx / Upgrade Rbenv
Last active August 29, 2015 14:11
Upgrade Rbenv
$ cd ~/.rbenv/plugins/ruby-build/
$ git pull
$ cd .rbenv
$ git pull
$ rbenv install <ruby-version>
@thotmx
thotmx / unicorn_aplicacion
Created May 16, 2014 21:38
unicorn_aplicacion
#!/bin/sh
set -e
# Feel free to change any of the following variables for your app:
TIMEOUT=${TIMEOUT-60}
APP_ROOT=/home/deployer/apps/<<aplicacion>>/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production"
AS_USER=deployer
set -u
@thotmx
thotmx / unicorn.rb
Last active August 29, 2015 14:01
config/unicorn.rb
root = "/home/deployer/apps/<<aplicacion>>/current"
working_directory root
pid "#{root}/tmp/pids/unicorn.pid"
stderr_path "#{root}/log/unicorn.log"
stdout_path "#{root}/log/unicorn.log"
listen "/tmp/unicorn.<<aplicacion>>.sock"
worker_processes 2
timeout 30
@thotmx
thotmx / nginx.conf
Last active August 29, 2015 14:01
nginx.conf
upstream unicorn {
server unix:/tmp/unicorn.<<aplicacion>>.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name example.com;
root /home/deployer/apps/<<aplicacion>>/current/public;
location ^~ /assets/ {