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
#!/usr/bin/env ruby | |
def trace(msg) | |
$stderr.puts msg | |
end | |
begin | |
require "rest" | |
rescue LoadError => e | |
trace("Install nap dependency") |
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
<link href="../paper-toggle-button/paper-toggle-button.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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 DomainFilter | |
def initialize(app, domain, &block) | |
@external_app = app | |
@domain_app = Rack::Builder.new(&block) | |
@domain = domain | |
end | |
def call(env) | |
if env["HTTP_HOST"].match(@domain) | |
@domain_app.call(env) |
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 | |
# This is a unix wrapper around the erlang vm. It provides the following functionality: | |
# | |
# * Spawns in foreground | |
# * Handle SIGHUP and call RELOADFUNC | |
# * Handle SIGTERM SIGQUIT and SIGINT telling to the vm to quit | |
# * Dies if the vm dies (for example kernel killing because out of memory) | |
# | |
# Forks and improvements are welcome. |
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
package rsa_test | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/sha1" | |
"crypto/x509" | |
"encoding/pem" | |
"io" | |
"testing" |
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 | |
case $1 in | |
*_EDITMSG|*MERGE_MSG|*_TAGMSG ) | |
/usr/local/bin/vim $1 | |
;; | |
*.md|*.txt ) | |
/usr/local/bin/mmdc $1 | |
;; | |
* ) |
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 | |
quit() | |
{ | |
jobs -p | xargs kill | |
} | |
trap quit SIGINT | |
cvlc http://streaming.fosdem.org/fosdem/janson.webm.m3u & | |
cvlc http://streaming.fosdem.org/fosdem/k-auditorium.webm.m3u & |
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
$ cat test/test_id_method.rb | |
require 'test/unit' | |
require 'ostruct' | |
print "\n", RUBY_VERSION, "\n" | |
class TestIdMethod < Test::Unit::TestCase | |
def test_id_method |
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
$ bundle install | |
Fetching source index for http://rubygems.org/ | |
Using rake (0.9.2.2) | |
Installing rake-hooks (1.2.3) | |
Using bundler (1.0.21) | |
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
😳 15:35:21 guillermo@Guillermos-MacBook-Pro:/tmp/asdf ruby-1.9.2-p290 | |
$ cat Gemf | |
Gemfile Gemfile.lock | |
😳 15:35:21 guillermo@Guillermos-MacBook-Pro:/tmp/asdf ruby-1.9.2-p290 |
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
[ | |
{ | |
"id": 1, | |
"name": { | |
"first": "Guillermo", | |
"last": "Alvarez" | |
}, | |
"child": [ | |
{ | |
"name": "pepe", |