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
(function(global, conn) { | |
"use strict"; | |
if (global.document) { | |
conn(global) | |
} else { | |
return; | |
} | |
})(typeof window !== "undefined" ? window : this, function(window, noGlobal) { |
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 node | |
// normally this file goes in bin/reinstall.js | |
// called by "reinstall": "node bin/reinstall.js" | |
const { promisify } = require('util'); | |
const exec = promisify(require('child_process').exec); | |
const pkg = require('../package.json'); |
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
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Icon must end with two \r | |
Icon | |
# Thumbnails |
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
/* Returns the approximate memory usage, in bytes, of the specified object. The | |
* parameter is: | |
* | |
* object - the object whose size should be determined | |
*/ | |
function sizeof(object){ | |
// initialise the list of objects and size | |
var objects = [object]; | |
var size = 0; |
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
function memorySizeOf(obj) { | |
var bytes = 0; | |
function sizeOf(obj) { | |
if(obj !== null && obj !== undefined) { | |
switch(typeof obj) { | |
case 'number': | |
bytes += 8; | |
break; | |
case 'string': |
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
# npm publish with goodies | |
# prerequisites: | |
# `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector json` | |
# `np` with optional argument `patch`/`minor`/`major`/`<version>` | |
# defaults to conventional-recommended-bump | |
# and optional argument preset `angular`/ `jquery` ... | |
# defaults to conventional-commits-detector | |
np() { | |
travis status --no-interactive && | |
trash node_modules &>/dev/null; |
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
uuid() | |
{ | |
local N B C='89ab' | |
for (( N=0; N < 16; ++N )) | |
do | |
B=$(( $RANDOM%256 )) | |
case $N in | |
6) |
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
# CONFIGURATION VARIABLES | |
# ------------------------------- | |
PYTHON_VERSION=2.7 | |
RUBY_VERSION=2.4.0 | |
HOME_LIB_PATH=$HOME/Library | |
SYS_LIB_PATH=/System/Library | |
SYS_FRWKS_PATH=$SYS_LIB_PATH/Frameworks | |
USER_BIN=/usr/bin |
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
# CONFIGURATION VARIABLES | |
# ------------------------------- | |
PYTHON_VERSION=2.7 | |
RUBY_VERSION=2.4.0 | |
HOME_LIB_PATH=$HOME/Library | |
SYS_LIB_PATH=/System/Library | |
SYS_FRWKS_PATH=$SYS_LIB_PATH/Frameworks | |
USER_BIN=/usr/bin |
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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export PATH=/mnt/c/Windows/System32:$PATH | |
export PATH=/cygdrive/c/Users/Joaquin/AppData/Local/atom/bin:$PATH | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# export POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
# export POWERLEVEL9K_RPROMPT_ON_NEWLINE=true | |
# Path to your oh-my-zsh installation. | |
export ZSH=~/.oh-my-zsh |