- Have a dependency on a process (i.e: you can't run if a specific process dies). This fits great into supervisor trees.
- Have a bidirectional dependency, where a parent can't run if the child dies, and you also want to kill the child if the parent dies in turn.
- Only need 1 link between processes (remember that if A and B are linked, all subsequent calls to link/2 will be ignored).
- You are a supervisor, or you want some kind of physical relationship between your processes in your architecture (i.e: you actually need to die or restart or try something out to fix the situation that led to the death of your child.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module StrongParamsHelpers | |
extend Grape::API::Helpers | |
def permitted_params | |
@permitted_params ||= declared(params, include_missing: false, include_parent_namespaces: false) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'smarter_csv' | |
require 'i18n' | |
require 'uri' | |
I18n.config.available_locales = :en | |
def filename(index, name) | |
new_name = I18n.transliterate(name.split(' ').map(&:downcase).join('_')).gsub("?",'') | |
return "#{index + 1}_#{new_name}.mp4" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
git checkout -b build | |
GOOS=linux buffalo build -z -o bin/heroku | |
git add . | |
git commit -a -m "binary commit" | |
git push heroku build:master --force | |
heroku run bin/heroku migrate |
- 2 kilos de aji chire con semilla
- 4 kilos de aji dulce criollo rojito el largito con semilla
- 1 ½ kilos de cebolla
- 1 ½ kilos de pimenton rojo sin semilla (puede ser rocoto)
- ½ kilo de ajo
- ¾ taza de vinagre
- ¾ taza de agua
- Sal al gusto
El dulce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 | |
set nocompatible " We're running Vim, not Vi! | |
filetype off | |
:set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'fatih/vim-go' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"code": 200, | |
"requestId": "56b398a5498e7ce97bb8f1c8" | |
}, | |
"notifications": [ | |
{ | |
"item": { | |
"unreadCount": 2 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#log de commits locales que no se han pusheado | |
alias gl='git log --branches --not --remotes --decorate' | |
alias gs='git status' | |
alias gf='git fetch origin' | |
alias gd='git difftool --tool=meld -d HEAD &' | |
alias ga='git add -u .;git add .' | |
alias gb='git branch -a' | |
gr(){ | |
git reset $* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'nokogiri' | |
module Suites | |
module XML | |
BASE_URL = 'http://menuboardmanager.com/xml/' | |
class << self | |
def prices_url | |
{ | |
:week_promo => 'dallassuiteshotelDiario.xml', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DefaultOrder | |
def order(data) | |
data | |
end | |
end | |
class RandomOrder | |
def order(data) | |
data.shuffle | |
end |