Skip to content

Instantly share code, notes, and snippets.

@ada-lovecraft
ada-lovecraft / a test md file
Last active March 21, 2017 01:37
love-notes tangler
# Hello, World!
``` > index.js
// this is a code block
#greet
greet()
```
this is more regular text
@ada-lovecraft
ada-lovecraft / Shape Inheritance
Created February 18, 2017 01:18
Shape Inheritance
function Shape(x, y) {
this.pos = new Point(x, y)
this.vertices = []
}
Shape.prototype.draw = function() {
translate(this.pos.x, this.pos.y)
push()
var prev = this.vertices[]
for(var i = 1; i < this.vertices.length; i++) {
@ada-lovecraft
ada-lovecraft / example-app.sh
Created February 14, 2017 16:53
Example App Structure
~/github/example-app
❯ tree -L 3
.
├── README.md
├── build.js
├── node_modules
│ ├── jquery
│ │ ├── AUTHORS.txt
│ │ ├── LICENSE.txt
│ │ ├── README.md
@ada-lovecraft
ada-lovecraft / .babelrc
Created January 26, 2017 19:41
Node es8 setup
{
"presets": ["env"]
}
@ada-lovecraft
ada-lovecraft / .atomrc
Last active January 25, 2017 12:23
atom-sync
{}
title author
LoveNotes
ada lovecraft

love-notes.js

Introducing LoveNotes, an atom package that seeks to act as an ecmascript notebook and code-blog.

Using atom's advanced scoping techniques, LoveNotes are markdown files that feature in-block syntax highlighting and a live updating preview window that allows you to -run- code blocks and embed output.

@ada-lovecraft
ada-lovecraft / # crosstool-ng - 2016-09-27_00-25-20.txt
Created September 27, 2016 05:28
crosstool-ng on macOS 10.12 - Homebrew build logs
Homebrew build logs for crosstool-ng on macOS 10.12
Build date: 2016-09-27 00:25:20
@ada-lovecraft
ada-lovecraft / CameraShakePlugin.js
Last active March 30, 2016 11:33
Phaser Camera Shake Plugin
/**
*
*/
export default class CameraShakePlugin extends Phaser.Plugin {
/**
* Constructor
* @param {Phaser.Game} game The game this plugin is attached to
* @return {null}
*/
import { get } from 'lodash'
let count = 0;
let floor = Math.floor;
export default class Destructable extends Phaser.Sprite {
static factory(x, y, assetKey, assetFrame, name = `destructable-${count++}`, group = this.world) {
return group.add(new Phaser.Destructable(this.game, x, y, assetKey, assetFrame, name));
}
constructor(game, x, y, assetKey, assetFrame, name) {
let noop = function() {
};
export default class ArcadeController {
static factory(moveStartCallback, moveCallback, fireCallback, cbContext) {
return new Phaser.ArcadeController(this.game, moveStartCallback, moveCallback, fireCallback, cbContext)
}
constructor(game, moveStartCallback = noop, moveCallback = noop, fireCallback = noop, callbackContext) {
game.input.holdRate = 150;
game.input.touch.consumeDocumentTouches();