Skip to content

Instantly share code, notes, and snippets.

View xaviervia's full-sized avatar

Fernando Via Canel xaviervia

View GitHub Profile
@burningTyger
burningTyger / patch.md
Created March 21, 2012 14:14
Using PATCH in Rack::Test

In case you want to use the PATCH verbin Rack::Test and you get errors when you try it with the current gem release you will have to use the git version in your Gemfile:

group :test do
  gem 'rack-test', :git => "https://github.com/brynary/rack-test.git"

While the PATCH verb has been included in a recent patch it's not yet in the gem release. Using the :git repo lets you test also PATCH routes for your rack app.

@mashihua
mashihua / post-commit
Created June 19, 2012 07:34
Git commit hook for trello.com
#!/usr/bin/env node
//please requist your app token from
//https://trello.com/1/connect?key=yourkey&name=git-hook&expiration=never&response_type=token&scope=read,write
var key = "your key";
var token = "your token";
//https://trello.com/board/-/4e9003324a517dad44465056
var board_id = "4e9003324a517dad44465056";
var Trello = require("node-trello");
@agnoster
agnoster / README.md
Last active March 10, 2025 15:41
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@graceavery
graceavery / harryPotterAliases
Last active September 20, 2024 22:13
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
@gcanti
gcanti / proof_in_functions.js
Created July 3, 2016 08:56
"Proof in functions" by @mbrandonw implemented in JavaScript and using Flow as a static type checker
// @flow
/*
"Proof in functions" by @mbrandonw
implemented in JavaScript and using Flow as a static type checker
Original post:
http://www.fewbutripe.com/swift/math/2015/01/06/proof-in-functions.html
*DateTime> show (MkLocalDateTime (MkTimeZone "GMT" (MkOffset (+) (MkInstant (MkHour 1) (MkMin 30) (MkSec 0)))) (MkDateTime (MkDate (MkYear 1991) September (MkDay 28)) (MkInstant (MkHour 21) (MkMin 12) (MkSec 0))))
"1991-09-28T21:12:00+01:30" : String
*DateTime> MkLocalDateTime (MkTimeZone "GMT" (MkOffset (+) (MkInstant (MkHour 1) (MkMin 30) (MkSec 0)))) (MkDateTime (MkDate (MkYear 1991) September (MkDay 28)) (MkInstant (MkHour 21) (MkMin 12) (MkSec 0)))
MkLocalDateTime (MkTimeZone "GMT" (MkOffset (+) (MkInstant (MkHour 1) (MkMin 30) (MkSec 0))))
(MkDateTime (MkDate (MkYear 1991) September (MkDay 28)) (MkInstant (MkHour 21) (MkMin 12) (MkSec 0))) : LocalDateTime (MkTimeZone "GMT"
(MkOffset (+)
(MkI