Skip to content

Instantly share code, notes, and snippets.

@mattdesl
mattdesl / about.md
Last active August 9, 2019 13:21
fast & optimized browserify builds

Small script for development + builds with browserify.

Uses loose-envify for faster inlining and cross-env to handle windows/unix shells.

Dev features:

  • fast rebuilds w/ watchify, LiveReload, syntax errors in DOM, etc.

Build features:

  • uglify, simple dead code elimination, optimized bundle.
@nisaacson
nisaacson / README.md
Last active December 9, 2019 01:17
Vim Javascript indentation via esformatter. Idea insired by http://yieldthedog.github.io/blog/2013/03/01/invoke-js-beautify-in-vim/
@angus-c
angus-c / advice.js
Created June 3, 2012 20:12
an advice functional mixin
//usage
withAdvice.call(targetObject);
//mixin augments target object with around, before and after methods
//method is the base method, advice is the augmenting function
withAdvice: function() {
['before', 'after', 'around'].forEach(function(m) {
this[m] = function(method, advice) {
if (typeof this[method] == 'function') {
return this[method] = fn[m](this[method], advice);

Happy Freelancing

Je m’appelle Thibaut Assus, j’ai 30 ans, je suis freelance en développement web et ma technologie de prédilection est le Ruby on Rails. J’ai maintenant un peu d’expérience dans le domaine du freelancing et ce document a pour but de partager avec vous une partie de cette expérience.

Mon parcours de développeur Ruby

@mattdesl
mattdesl / fancy.frag
Last active May 8, 2022 07:11
how we're currently using glslify + ThreeJS
varying vec2 vUv;
uniform sampler2D tDiffuse;
uniform sampler2D tColorLUT;
uniform vec2 resolution;
#pragma glslify: blendOverlay = require(./glsl-blend-overlay)
#pragma glslify: displace = require(./glsl-displace)
#pragma glslify: srcOver = require(./glsl-src-over)
#pragma glslify: colorCorrect = require(glsl-lut/flipY)
@tpope
tpope / css.vim
Created January 2, 2011 05:42
Nikolai's fix to nested closing curly brace indenting
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-12-22
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@gmccreight
gmccreight / master.vim
Last active September 23, 2023 08:41
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@sr75
sr75 / run-ie-7-8-9-virtualbox-on-osx.txt
Created March 15, 2012 13:52
Run IE 7, 8, and 9 in Mac OS X
# the admin password for all of the IE VMs is “Password1″ without the quotes, it's also used for the password hints
1) Install VirtuaBox on your mac
http://download.virtualbox.org/virtualbox/4.1.10/VirtualBox-4.1.10-76795-OSX.dmg
2) Decide which versions of Internet Explorer you want to download and install – each version of Internet Explorer is contained within a separate virtual machine that runs within VirtualBox. In other words, if you want to run Internet Explorer 7, 8, and 9, you will need to download three separate VM’s, which may take a while so keep that in mind. Select the text below and copy it:
# Install ALL versions of Internet Explorer: IE 7, IE 8, and IE 9 (for now this script will also pull down a IE 6 vm with windows xp)
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/