Skip to content

Instantly share code, notes, and snippets.

@max-giro
max-giro / perlin-noise-classical.js
Created March 6, 2012 20:39 — forked from banksean/perlin-noise-classical.js
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.
*/
@max-giro
max-giro / Custom.css
Created February 6, 2012 18:07 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@max-giro
max-giro / contact.coffee
Created February 5, 2012 23:21 — forked from maccman/contact.coffee
Spine Contacts Screencast
Spine = require('spine')
class Contact extends Spine.Model
@configure 'Contact', 'name', 'email', 'mobile', 'lat', 'lng'
@extend Spine.Model.Local
@filter: (query) ->
return @all() unless query
query = query.toLowerCase()
@max-giro
max-giro / index.mdown
Created January 30, 2012 19:05 — forked from adamstac/index.mdown
Setting up Apache on OSX Snow Leopard (PHP, Virtual Hosts & .htaccess)

Setting up Apache on OSX Snow Leopard (PHP, Virtual Hosts & .htaccess)

After every change you make to the Apache or PHP config files you will need to restart the Apache web server.

PHP

By default PHP is disabled on OSX, so we'll need to turn that on.

mate /etc/apache2/httpd.conf
@max-giro
max-giro / appify
Created December 24, 2011 23:58 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@max-giro
max-giro / rsync_backup
Created December 24, 2011 23:54 — forked from necolas/rsync_backup
Maintain a bootable clone of Mac OS X volume
#!/bin/sh
PROG=$0
RSYNC="/usr/bin/rsync"
SRC="/"
DST="/Volumes/Backup/"
# rsync options
# -v increase verbosity
# -a turns on archive mode (recursive copy + retain attributes)
@max-giro
max-giro / h5bp-twitter-bootstrap
Created December 9, 2011 14:03 — forked from mklabs/bootstrap-plugins.txt
h5bp + twitter bootstrap integration
#!/usr/bin/env bash
src=$PWD
dirname=$(dirname $(readlink -f $0))
# need help ? if no args and help flags
if [ "$1" == '-h' ]
then
cat <<EOF
@max-giro
max-giro / halftone.pde
Created December 6, 2011 12:05 — forked from desandro/halftone-cartesian.pde
Half-ton halftones Processing sketch
PGraphics flatImg;
PImage img;
float rt3 = sqrt(3);
float res = 10; /* resolution */
float radius = 2.1 * res / rt3;
float zoom = 1.0;
void setup() {
noLoop();
smooth();
@max-giro
max-giro / readme-outline.md
Created November 16, 2011 17:59 — forked from indexzero/readme-outline.md
A quick outline of a README.md

README.md Outline

  • Header and a Brief description (should match package.json)
  • Example (if applicable)
  • Motivation (if applicable)
  • API Documentation: This will likely vary considerably from library to library.
  • Installation
  • Tests
  • Contributors
  • License
// Here is a proposal for minimalist JavaScript classes, humbly offered.
// There are (at least) two different directions in which classes can be steered.
// If we go for a wholly new semantics and implementation, then fancier classical
// inheritance can be supported with parallel prototype chains for true inheritance
// of properties at both the class and instance level.
// If however, we keep current JavaScript prototype semantics, and add a form that
// can desugar to ES3, things must necessarily stay simpler. This is the direction
// I'm assuming here.