- adomokos/light-service
- Series of Actions with an emphasis on simplicity.
- collectiveidea/interactor
- Interactor provides a common interface for performing complex interactions in a single request. (Alert: this project seems to be inactive).
- cypriss/mutations
- Compose your business logic into commands that sanitize and validate input.
- orgsync/active_interaction
- Manage application specific business logic.
This file contains 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
FROM ruby:2.3.1 | |
# Install dependencies | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
# Set an environment variable where the Rails app is installed to inside of Docker image: | |
ENV RAILS_ROOT /var/www/app_name | |
RUN mkdir -p $RAILS_ROOT | |
# Set working directory, where the commands will be ran: |
This file contains 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
# remove current vim | |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
# removes current link for vim | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
# add ppa for newest version of ruby (currently, as of 06/06/2017, ruby v2.4) | |
sudo apt-add-repository ppa:brightbox/ruby-ng | |
sudo apt-get update |
I hereby claim:
- I am alejandrobabio on github.
- I am alejandrobabio (https://keybase.io/alejandrobabio) on keybase.
- I have a public key whose fingerprint is 98F7 03BC F3B8 EF14 3C60 F3D7 E618 5CEC C03F FA24
To claim this, I am signing this object:
This file contains 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
flat = (l = ->(x) { x.flat_map {|e| Array === e ? l.(e) : e } }) | |
flat.([1, 2, 3, [4, 5, [6], [ ] ] ]) | |
#==> [1,2,3,4,5,6] |
This file contains 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
doctype html | |
html | |
head | |
link rel="stylesheet" href=asset("application.css") | |
script rel="javascript" type="text/javascript" src=asset("ng_application.js") | |
body | |
== yield |
This file contains 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
Symbolize = (l = ->(h) { h.inject({}) { |m, (k,v)| m[(String === k ? k.to_sym : k)] = (Hash === v ? l.(v) : v); m }}) | |
# Example: | |
hash = { 'task' => { 'description' => 'Ab@ @example @cd', 'target' => { 'label' => 'cd' } } } | |
Symbolize.(hash) | |
# => { :task => { :description => "Ab@ @example @cd", :target => { :label => "cd" } } } |
This file contains 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
function query() { | |
var | |
// HN is done with very unsemantic classes. | |
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')), | |
query_list = Array.prototype.slice.call(arguments), | |
shown = 0, total = job_list.length; | |
// Traverses up the dom stack trying to find a match of a specific class | |
function up_to(node, klass) { | |
if (node.classList.contains(klass)) { |
NewerOlder