Skip to content

Instantly share code, notes, and snippets.

View death667b's full-sized avatar

Ian Daniel death667b

  • Brisbane, Australia
View GitHub Profile
@death667b
death667b / gist:f5ef11bbcd07a726183f
Created February 26, 2016 07:06
FreeCodeCamp question
// Setup
var collection = {
2548: {
album: "Slippery When Wet",
artist: "Bon Jovi",
tracks: [
"Let It Rock",
"You Give Love a Bad Name"
]
},
@death667b
death667b / fizzbuzz.py
Created June 9, 2016 23:22
FizzBuzz in Python
for x in range (1, 101):
if ((x % 3) == 0) and ((x % 5) == 0):
print "FizzBuzz"
elif ((x % 3) == 0):
print "Fizz"
elif ((x % 5) == 0):
print "Buzz"
else:
print x
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
var spiDev = "/dev/spidev0.0";
var cePin = 8;
var irqPin = 5;
var pipes = [0xABCDABCD71, 0x544d52687C];
var nrf = require('nrf');
var radio = nrf.connect(spiDev, cePin, irqPin); // Connect to the radio
radio.channel(0x4c); // Set channel to 76
radio.transmitPower('PA_LOW');
radio.dataRate('1Mbps') // Set data rate to 1Mbps
/*
// March 2014 - TMRh20 - Updated along with High Speed RF24 Library fork
// Parts derived from examples by J. Coliz <maniacbug@ymail.com>
*/
/**
* Example for efficient call-response using ack-payloads
*
* This example continues to make use of all the normal functionality of the radios including
* the auto-ack and auto-retry features, but allows ack-payloads to be written optionally as well.
* This allows very fast call-response communication, with the responding radio never having to
"use strict";
(function() {
Error.stackTraceLimit = Infinity;
var $global, $module;
if (typeof window !== "undefined") { /* web page */
$global = window;
} else if (typeof self !== "undefined") { /* web worker */
$global = self;
module.exports = function(hljs) {
var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
var KEYWORDS = {
keyword:
'in of if for while finally var new function do return void else break catch ' +
'instanceof with throw case default try this switch continue typeof delete ' +
'let yield const export super debugger as async await static ' +
// ECMAScript 6 modules import
'import from as'
,
const magik = magikcraft.io;
function EDIT_THIS() {
}
const magik = magikcraft.io;
function EDIT_THIS() {
}
@death667b
death667b / __MAGIKCRAFT__.death667b.magikcraft_spells.md
Last active July 23, 2017 03:28
Magikcraft Spells, by death667b.