I hereby claim:
- I am rcmachado on github.
- I am rcmachado (https://keybase.io/rcmachado) on keybase.
- I have a public key whose fingerprint is 778C 615C C641 8517 3318 F0F5 02B6 97FD CCAF B437
To claim this, I am signing this object:
from __future__ import absolute_import | |
# | |
# To run: | |
# | |
# $ pip install pyjwt | |
# $ python main.py | |
# | |
import jwt |
I hereby claim:
To claim this, I am signing this object:
.SILENT: | |
.PHONY: help | |
# Based on https://gist.github.com/prwhite/8168133#comment-1313022 | |
## This help screen | |
help: | |
printf "Available targets\n\n" | |
awk '/^[a-zA-Z\-\_0-9]+:/ { \ | |
helpMessage = match(lastLine, /^## (.*)/); \ |
#!/bin/sh | |
# Install & configure boxen | |
SKIP_ENCRYPTION="--no-fde" | |
BOXEN_REPOSITORY="https://github.com/rcmachado/my-boxen" | |
sudo mkdir -p /opt/boxen | |
sudo chown ${USER}:staff /opt/boxen | |
git clone ${BOXEN_REPOSITORY} /opt/boxen/repo | |
cd /opt/boxen/repo |
#!/bin/bash | |
# | |
# Script to copy all tables from one database to another. | |
# | |
# Requires: | |
# * MySQL 5.6 | |
# * Percona xtrabackup tools (http://www.percona.com/software/percona-xtrabackup) | |
# | |
# Known caveats: | |
# * Will copy structure of all tables from one database to another, but only InnoDB |
<?php | |
use \OAuth\Common\Token\TokenInterface; | |
use \OAuth\Common\Storage\Exception\TokenNotFoundException; | |
use \OAuth\Common\Storage\Exception\AuthorizationStateNotFoundException; | |
use \OAuth\Common\Storage\TokenStorageInterface; | |
use \sfStorage; | |
class Symfony1Storage implements TokenStorageInterface | |
{ |
// disable :hover on touch devices | |
// based on https://gist.github.com/4404503 | |
// via https://twitter.com/javan/status/284873379062890496 | |
// + https://twitter.com/pennig/status/285790598642946048 | |
// re http://retrogamecrunch.com/tmp/hover | |
// NOTE: we should use .no-touch class on CSS | |
// instead of relying on this JS code | |
function removeHoverCSSRule() { | |
if ('createTouch' in document) { | |
try { |
<?php | |
$errorLevel = error_reporting(); | |
print "Current error_reporting level: $errorLevel <br>\n"; | |
print "E_ALL value: " . E_ALL . " <br>\n"; | |
for ($i = 0; $i < 15; $i++) { | |
$errVal = $errLevel & pow(2, $i); | |
print FriendlyErrorType($errVal) . " ($errVal) <br>\n"; | |
} |
# install brew if not installed | |
which brew > /dev/null || ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# update brew package list | |
brew update | |
# install git from brew | |
[[ -x /usr/local/bin/git ]] || brew install git | |
# if git is installed, upgrade it |
/** | |
* Logger class to print messages according to specified level. | |
* | |
* Usage: | |
* var log = new Logger(Logger.INFO); | |
* log.info("Show message"); | |
*/ | |
function Logger(level) { | |
this.level = level || Logger.DEBUG; |