Skip to content

Instantly share code, notes, and snippets.

View gvn's full-sized avatar
🥀
technopagan is the term

Gavin Suntop gvn

🥀
technopagan is the term
View GitHub Profile
@gvn
gvn / objectCreate.js
Last active December 11, 2015 18:58
Illustrated side effect of modifying children of object properties on prototypes. IMO: Object.create() should have a deep copy option.
var Person = function () {};
Person.prototype.name = 'Person';
Person.prototype.config = {
arms: 2
};
Person.prototype.metadata = {
type: 'Person'
@gvn
gvn / grunt.sublime-build
Created December 26, 2012 20:16
Sublime Text 2 : Grunt Build System
{
"cmd": ["grunt", "--no-color"],
"selector": ["source.js", "source.less", "source.json"]
}
@gvn
gvn / arduino-sublime.md
Created December 3, 2012 18:55
Building and Uploading Arduino Sketches in Sublime Text 2 (OSX)

Building and Uploading Arduino Sketches in Sublime Text 2 (OSX)

  • Download this Makefile

  • Install YAML and SerialPort Perl libraries

Using Terminal:

sudo cpan >

@gvn
gvn / Makefile
Created December 3, 2012 00:59
Arduino Makefile Starter
BOARD_TAG = uno
ARDUINO_PORT = /dev/cu.usb*
ARDUINO_LIBS =
include /usr/local/arduino/Arduino.mk
@gvn
gvn / jsproto.js
Created August 15, 2012 20:48
JS Prototype Fun
Function.prototype.times = function (times) {
while (times) {
this.call();
times--;
}
}
@gvn
gvn / somen-tempeh-broccoli
Created July 11, 2012 02:58
Somen with Tempeh and Broccoli
Somen with Tempeh and Broccoli
- Tempeh brick
- Broccoli florets
- Canola oil
- 1 tbsp Maple Syrup
- 1 tbsp Tamari
- 1 tbsp Water
- 1/4 tsp liquid smoke
- Somen noodles (1 bundle broken in half)
@gvn
gvn / binding.js
Created June 19, 2012 23:53
event binding pattern
window.Component = {
init: function () {
var self = this;
self.events.parent = self;
self.callbacks = {};
},
events: {
actionHappened: function (event) {
var self = this.parent;