Skip to content

Instantly share code, notes, and snippets.

View cliffhall's full-sized avatar
💥
Technology pivot appearing onscreen now, captain.

Cliff Hall cliffhall

💥
Technology pivot appearing onscreen now, captain.
View GitHub Profile
@Akjosch
Akjosch / dialogue2.tw
Last active November 5, 2019 10:30
Another SugarCube one-passage dialogue example
/* The dialogue setup - typically at the start of the passage */
<<set _dialogue = {
"": {
text: "<div>Before you stands a wizard, clad in heavy robes, scarves, and a pointed hat. He gives a cheerful but heavily muffled greeting. <q>Ownt fon?</q> the wizard inquires as he holds out a handful of rings which radiate magical energy.</div><div>Take one?</div>",
choices: [
{ text: "One with a shiny jewel on top!", next: "death" },
{ text: "A band with runes glowing around it!", next: "runes" },
{ text: "Mom told me not to accept strange items from people I don't know&hellip;", next: "death"},
{ text: "Go away.", next: "death", filter: "$day != 7" }
]},
@ilio
ilio / React-PropTypes-to-prop-types.js
Last active September 18, 2021 00:23 — forked from zkat/index.js
React-PropTypes-to-prop-types
#!/usr/bin/env node
console.log('v6', process.argv, process.cwd(), __dirname);
const {exec} = require('child_process');
const path = require('path');
exec('npm bin', {cwd: __dirname}, (err, stdout, stderr) => {
if (err) {
console.error(err);
} else {
@katowulf
katowulf / 1_using_queries.js
Last active April 24, 2023 07:14
Methods to search for user accounts by email address in Firebase
/***************************************************
* Simple and elegant, no code complexity
* Disadvantages: Requires warming all data into server memory (could take a long time for MBs of data or millions of records)
* (This disadvantage should go away as we add optimizations to the core product)
***************************************************/
var fb = firebase.database.ref();
/**
* @param {string} emailAddress
@max-mapper
max-mapper / helloworld.js
Created November 27, 2012 06:55
droneduino
var serialport = require('node-serialport')
var sp = new serialport.SerialPort("/dev/ttyO3", {
parser: serialport.parsers.raw,
baud: 9600
})
sp.on('data', function(chunk) {
console.log(chunk.toString('hex'), chunk.toString(), chunk)
})
@beautifycode
beautifycode / AIR 2.6 iOS Build File
Created April 8, 2011 08:51
Light-weight and clean iOS AIR 2.6 ANT build file. Works, yes.
<?xml version="1.0" encoding="UTF-8"?>
<project default="1. Create directories" name="Deploy AIR 2.6 on iOS">
<tstamp>
<format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss" />
</tstamp>
<property environment="env." />
<property name="flex_home" location="${env.FLEX_HOME}_AIR26" />