Skip to content

Instantly share code, notes, and snippets.

View lipp-button.js
// Source at
function _getConfig() {
var confObj = {};
var builders = buildForm.querySelectorAll('input, select');
var i = 0;
var el;
aitor /
Created Dec 31, 2018
POWERLEVEL9K custom elixir/erlang prompt segment
prompt_asdf_elixir() {
if [ $commands[asdf] ]; then
local asdf_global_conf="$HOME/.tool-versions"
local version_regex="s/^\([.0-9]*\).*/\1/p"
local config_regex="s/.*(set by \(.*\))/\1/p"
local elixir_current="$(asdf current elixir)"
local elixir_current_version="$(echo $elixir_current | sed -n $version_regex)"
View 20160307172445_change_paperclip_attachment_path.rb
class MoveAttachmentsToNewLocation < ActiveRecord::Migration
def initialize(name =, version = nil)
access_key = Rails.application.secrets.g3_access_key_id
secret_key = Rails.application.secrets.g3_secret_access_key
storage = google_storage_access_key_id: access_key,
google_storage_secret_access_key: secret_key
@bucket_name = Rails.application.secrets.g3_bucket
@bucket = storage.directories.get(@bucket_name)
super(name, version)
aitor / notification_flood.rb
Last active Jan 26, 2017 — forked from mort/Fighting notification flood with the alea gem
Fighting notification flood with the alea gem
View notification_flood.rb
# Activity streams' notifications to third parties are cool because they bring
# a feeling of a shared public space and increase the chance serendipitous findings
# But too much information quickly becomes noise, and relevant bits of news can
# disappear among a tsunami of irrelevant (to me) "x did y with z'
# What we're trying to do here is going from deterministic notifications
# (stuff happens, stuff gets broadcasted) to stochastic ones (stuff happens,
# stuff may gets broadcasted)
aitor /
Last active Aug 3, 2016 — forked from syntagmatic/
Nutrition Parallel Sets
View gist:8665081
› heroku run script/console
Running `script/console` attached to terminal... up, run.5405
! Heroku client internal error.
! Search for help at:
! Or report a bug at:
Error: Operation timed out - connect(2) (Errno::ETIMEDOUT)
Backtrace: /Users/aitor/.heroku/client/lib/heroku/client/rendezvous.rb:40:in `initialize'
/Users/aitor/.heroku/client/lib/heroku/client/rendezvous.rb:40:in `open'
/Users/aitor/.heroku/client/lib/heroku/client/rendezvous.rb:40:in `block in start'
View gist:5108575


Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg
View css
Syntax error: An @import loop has been found: /Users/aitor/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/zurb-foundation-3.2.5/lib/../scss/foundation/functions/modular-scale.scss imports itself
on line 3 of /Users/aitor/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/zurb-foundation-3.2.5/lib/../scss/foundation/functions/modular-scale.scss
from line 3 of /Users/aitor/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/zurb-foundation-3.2.5/lib/../scss/foundation/functions/modular-scale.scss
1: // Legacy support since modular scale
2: // used to reside directly within Foundation
3: @import "modular-scale";
aitor / gist:5029549
Last active Dec 14, 2015
Proposal for DareConf 2013
View gist:5029549

Digital Legacies and Death

Primary theme: Vulnerability and courage

Talk description

I want to talk about Death.

If there is one thing that has caused fear in every living creature from dawn of history to present day is death. Fear and pain are the basis for our self-preservation instincts but accepting our own mortality is so hard that we've created a whole set of "immortality systems" -national identities, art, religion, work and social structures- to delude ourselves (cf. Ernest Becker) and forget we're mortal.

View yaml.rb
# Same result in 1.8.7 and all 1.9.x ruby versions.
> puts YAML.dump( :NO => "dew",:no => "Hey", 'no' => 12, :N => "we" )
"no": 12
:no: Hey
:NO: dew
:N: we