Skip to content

Instantly share code, notes, and snippets.

@boton
boton / git-fs-history
Created May 8, 2018 08:07 — forked from jackocnr/git-fs-history
Git filesize history (shell script)
#!/bin/sh
#
# list the given file's filesize next to each commit
# usage: git-fs-history path/to/file
#
if [ $# -ne 1 ]; then
echo "Error: invalid number of arguments."
exit 1
@boton
boton / parse_dotenv.bash
Created April 4, 2018 00:00 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
/***
<button> reset
1. Remove default browser appearance for buttons.
2. Remove margins.
3. Remove borders for IE.
4. Normalize font and color not inherited by `button`.
5. Address `overflow` in IE
6. Normalize cursor style
7. Normalize line-height
8. Normalize text-align
git archive -o latest.zip HEAD
const uniq = arrArg => arrArg.filter((elem, index, arr) => arr.indexOf(elem) === index);
@boton
boton / Change Font.sketchplugin
Last active January 3, 2016 11:59 — forked from bomberstudios/Change Font.sketchplugin
Change font family for all text layers in Sketch
// Change font (ctrl a)
var font_name,
select_one_textlayer = false;
function check_layer(layer){
log("Checking layer " + layer + " of klass: " + [layer class])
switch ([layer class]) {
case MSTextLayer:
log("Found text layer!")
layer.setFontPostscriptName(font_name);

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
var Autobot = function(nombre){
this.nombre = nombre;
this.timer = +new Date();
};
Autobot.prototype.saludar = function() {
alert('Hola, me llamo '+ this.nombre + '\nTime: ' + (+new Date() - this.timer) + 'ms' );
};
Autobot.prototype.saludoDelay = function(ms){