Skip to content

Instantly share code, notes, and snippets.

View alvaropinot's full-sized avatar
🤘
Metal this

Alvaro Pinot @alvaropinot alvaropinot

🤘
Metal this
View GitHub Profile
@addyosmani
addyosmani / browserify.md
Last active March 28, 2016 02:06
Yeoman + Browserify

Yeoman generators with Browserify

Browserify is a tool that allows us to write node-style modules that compile for use in the browser. Like node, we write our modules in separate files, exporting external methods and properties using the module.exports and exports variables

generator-browserify is a generator with a Browserify setup, offering choices between Gulp or Grunt and Foundation or Bootstrap.

screenshot 2014-04-20 at 10 19 09 pm

generator-angular-with-browserify is a generator for bundling Angular.js with Browserify

@sidorares
sidorares / output.txt
Created September 27, 2013 02:31
node.js empty loop optimisation test
[marking boo 0x168ec4f7ae88 for recompilation, reason: small function, ICs with typeinfo: 1/8 (12%)]
Analyzing block B0
Initial inferred range of 1 (Constant) set to [-2147483648,2147483647]
Initial inferred range of 54 (Constant) set to [1,1]
Initial inferred range of 15 (Constant) set to [-2147483648,2147483647]
Initial inferred range of 2 (ArgumentsObject) set to [-2147483648,2147483647]
Initial inferred range of 3 (Parameter) set to [-2147483648,2147483647]
Initial inferred range of 4 (Context) set to [-2147483648,2147483647]
Analyzing block B1
Initial inferred range of 10 (LoadGlobalCell) set to [-2147483648,2147483647]
@pixelhandler
pixelhandler / Measuring-Performance-with-User-Timing-API.md
Last active March 18, 2019 04:05
Notes from talk at Ember-SC Feb '15 Meetup and EmberConf 2015 Minitalk: Measuring Performance with User Timing API
@zachwills
zachwills / _spacing.scss
Created December 19, 2014 14:05
SCSS Spacing (padding / margin) mixin
/* ==========================================================================
Spacing Mixins
========================================================================== */
/**
* Define these spacing variables
*/
$spacing-base: 28px;
$spacing-double: $spacing-base*2;
$spacing-triple: $spacing-base*3;
@WebReflection
WebReflection / String.prototype.template.js
Last active August 17, 2022 04:04
ES6 Template like strings in ES3 compatible syntax.
// this is now a module:
// https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines--
var template = require('backtick-template');
// just string
const info = 'template';
`some ${info}` === template('some ${info}', {info});
@niksmac
niksmac / fix_npm.sh
Last active January 9, 2023 22:36
Fixing npm permissions
#!/usr/bin/env bash
set -e
echo ''
info () {
printf "\r [ \033[00;34m..\033[0m ] $1\n"
}
@ericelliott
ericelliott / defaults-overrides.md
Last active May 7, 2023 13:52
ES6 defaults / overrides pattern

ES6 Defaults / Overrides Pattern

Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.

function foo ({
    bar = 'no',
    baz = 'works!'
  } = {}) {
@steve-jansen
steve-jansen / .vault
Last active June 7, 2024 03:30
HashiCorp Vault Token Helper using the OS X Keychain
token_helper = "/Users/me/.vault-helper"
@yetithefoot
yetithefoot / chrome-enable-memory
Last active August 11, 2025 16:26
Runs Google Chrome with memory objects
To enable window.gc() on Chrome browser console you just need to start Chrome like this:
> /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --js-flags="--expose-gc" --enable-memory-info
Those flags enable the following console API, very usefull to debug memory leaks:
> console.memory // print memory information
> window.gc() // force garbage collection
/*
A simple little editor extension to copy and paste all components
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html
license: WTFPL (http://www.wtfpl.net/)
author: aeroson
advise: ChessMax
editor: frekons
*/
#if UNITY_EDITOR