Skip to content

Instantly share code, notes, and snippets.

View linuxsable's full-sized avatar

Tyler Van Hoomissen linuxsable

View GitHub Profile
{
"entries": [
"A different kettle of fish",
"Bogan",
"Petrol",
"Smoko",
"Stickybeak"
]
}
function Vehicle() {
this.numTires = 4
}
Vehicle.prototype.start = () => {
console.log('engine starting!')
}
// const v = new Vehicle()
// v.start()
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#!/bin/sh
CUR_DATE=$(date "+%m-%d-%y_%H-%M-%S")
imagesnap - ~/Documents/CommitScreens/${CUR_DATE}_camera.jpeg -q
screencapture ~/Documents/CommitScreens/${CUR_DATE}_screen.jpeg -t jpg
@linuxsable
linuxsable / gist:423647572e9b632b50ea
Created March 7, 2015 00:45
Jasmine default matchers
describe('built-in matchers', function() {
describe('toBeTruthy', function() {
it('passes if subject is true', function() {
expect(true).toBeTruthy();
expect(false).not.toBeTruthy();
});
});
describe('toBeFalsy', function() {
it('passes if subject is false', function() {
AN INHABITANT OF CARCOSA
For there be divers sorts of death - some wherein the body remaineth; and in some it vanisheth quite away with the spirit. This commonly occurreth only in solitude (such is God’s will) and, none seeing the end, we say the man is lost, or gone on a long journey - which indeed he hath; but sometimes it hath happened in sight of many, as abundant testimony showeth. In one kind of death the spirit also dieth, and this it hath been known to do while yet the body was in vigor for many years. Sometimes, as is veritably attested, it dieth with the body, but after a season is raised up again in that place where the body did decay.
Pondering these words of Hali (whom God rest) and questioning their full meaning, as one who, having an intimation, yet doubts if there be not something behind, other than that which he has discerned, I noted not whither I had strayed until a sudden chill wind striking my face revived in me a sense of my surroundings. I observed with astonishment that everyth
/**
* THIS CODE IS AWFUL!
*
* It was written over a weekend for a game development competition.
*
* I kinda was going to write something sane when I got started, and have the Shader stuff
* in its own file, but then as Ludum Dare went on, I kinda.. stopped. It's a big spaghetti
* mess now.
*
* Enjoy!
//
// StatusBarAppAppDelegate.m
// StatusBarApp
//
// Created by CCoding on 18.09.11.
// Copyright 2011 CCoding. All rights reserved.
//
#import "StatusBarAppAppDelegate.h"
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
id bacon = [NSEvent addGlobalMonitorForEventsMatchingMask:NSKeyDownMask handler: ^(NSEvent *event) {
NSUInteger flags = [event modifierFlags] & NSDeviceIndependentModifierFlagsMask;
NSLog(@"hi");
if (flags == NSControlKeyMask + NSShiftKeyMask) {
}
}];
NSLog(@"%@", bacon);
}
(defn divides?
"Does divisor divide dividend evenly?"
[dividend divisor]
(zero? (rem dividend divisor)))
(defn factors
"Returns a sequence of all factors of p."
[p]
(filter #(divides? p %) (range 2 p)))