Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathan Phillip Brink binki

View GitHub Profile
View gist:a19bf55c21fe71b2775e957cdb69a53d
void setup()
{
byte b[] = loadBytes("ih.mid");
for (int i = 0; i < b.length && i < 16; i++)
{
if ((i % 10) == 0)
{
println();
}
@binki
binki / ThrottleDemo.cs
Last active May 11, 2017 — forked from AArnott/ThrottleDemo.cs
Demonstrates scheduling unbounded work and applying a throttle to keep the threadpool responsive.
View ThrottleDemo.cs
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
View AsyncDisposal.cs
using System;
using System.Threading.Tasks;
class Program
{
static void Main() => new Program().Run().Wait();
async Task Run()
{
Console.WriteLine("Before Using");
await Async.Using(new Test(), t =>
View PushbulletBookmarklet.html
<a href="javascript:void(window.open('https://pushbullet.com/push/link?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)))">Push</a></a>
<!-- Source: http://pastebin.com/183UqMc1 -->
View PHP Sort by Scripture (Bible)
<?php
function _scripturebooks() {
return array("Genesis", "Exodus", "Leviticus", "Numbers", "Deuteronomy", "Joshua", "Judges", "Ruth", "1 Samuel", "2 Samuel", "1 Kings", "2 Kings", "1 Chronicles", "2 Chronicles", "Ezra", "Nehemiah", "Esther", "Job", "Psalm", "Proverbs", "Ecclesiastes", "Song of Solomon", "Isaiah", "Jeremiah", "Lamentations", "Ezekiel", "Daniel", "Hosea", "Joel", "Amos", "Obadiah", "Jonah", "Micah", "Nahum", "Habakkuk", "Zephaniah", "Haggai", "Zechariah", "Malachi", "Matthew", "Mark", "Luke", "John", "Acts", "Romans", "1 Corinthians", "2 Corinthians", "Galatians", "Ephesians", "Philippians", "Colossians", "1 Thessalonians", "2 Thessalonians", "1 Timothy", "2 Timothy", "Titus", "Philemon", "Hebrews", "James", "1 Peter", "2 Peter", "1 John", "2 John", "3 John", "Jude", "Revelation");
}
function scripturesort($a, $b) {
if ($a == $b) {return 0;}
$order=_scripturebooks();