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
/** | |
* ValidateSpanishID. Returns the type of document and checks its validity. | |
* | |
* Usage: | |
* ValidateSpanishID( str ); | |
* | |
* > ValidateSpanishID( '12345678Z' ); | |
* // { type: 'dni', valid: true } | |
* | |
* > ValidateSpanishID( 'B83375575' ); |
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
#!/bin/bash | |
# Downloads and install a .dmg from a URL | |
# | |
# Usage | |
# $ dmginstall [url] | |
# | |
# For example, for installing alfred.app | |
# $ dmginstall http://cachefly.alfredapp.com/alfred_1.3.1_261.dmg | |
# |
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
# place in `bin/filemerge` and make it executable | |
open -a FileMerge -n -W --args "$@" |
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
#!/bin/bash | |
branch=`git branch -a | sed 's/^\*//; s/^[ \t]*//; /HEAD.*/d; /^remotes\/origin\/$/d' | fzf --height 40% --border --reverse --preview 'git log --color=always {} -10' | sed 's/remotes\/origin\///'` | |
if [[ $branch ]]; then | |
git checkout $branch | |
fi |
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
#!/bin/bash | |
# Change the iterm2 profile programatically | |
function iterm_profile { | |
if [[ -z $1 ]]; then | |
profile="Default" | |
else | |
profile=$1 | |
fi |
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($) { | |
$.fn.plugin = function() { | |
return this.each(function() { | |
var $this = $( this ); | |
if ( !$this.data('plugin') ) { | |
$this.data( 'plugin', new Plugin(this) ); | |
} | |
}); | |
} |
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
{ | |
"black": "#040506", | |
// UI BGs | |
"grey1": "#08090b", | |
"grey2": "#101216", | |
"grey3": "#1c1f25", | |
// UI subtle | |
"grey4": "#3e424b", |
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
# WikiStance. A Wikipedia distance meter. | |
# Based on the alt text of http://xkcd.org/903/ | |
# Gets a Wikipedia URL and measure the distance of this page to the Philosophy article, clicking on links not in parens | |
# neither italics | |
# | |
# Author:: Alejandro Fernández (mailto:antarticonorte@gmail.com) | |
# Copyright:: Copyright (c) 2011 Alejandro Fernández | |
# License:: GPL | |
# | |
# =Usage= |
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
/** | |
* @file Some description of the file | |
* @author Me | |
*/ | |
import something from 'somewhere'; | |
const SOMETHING = { | |
some: 'thing' | |
} |
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
#!/bin/bash | |
# virtualenv-auto-activate.sh | |
# | |
# Adapted from https://gist.github.com/codysoyland/2198913 | |
# | |
# Installation: | |
# Add this line to your .bashrc or .bash-profile: | |
# | |
# source /path/to/virtualenv-auto-activate.sh | |
# |
NewerOlder