Skip to content

Instantly share code, notes, and snippets.

View sudonhim's full-sized avatar

Brenton Milne sudonhim

  • 09:21 (UTC -08:00)
View GitHub Profile
|= dim=@ud
^- @ux
:: Pixel bytes for 24bpp dim*dim image
:: Note: this calculation does not support padding, so dim%4 must be 0
::
=/ datasize=@ (mul 3 (mul dim dim))
:: The header is a list of [bytes, value] to be composed into a single blob
::
=/ header=@
%+ can 3
--Detective Spooner--
--Author: Sudo (aka SudoNhim)
--Version: 1.1 - 22/03/2012
--Detective Spooner examines each significant pair of long words and tries
--to establish which pairs make good spoonerisms. If a pair is selected,
--the words are substituted for the spoonerism.
--Spoonerisms are recorded so they will not happen if the user tries to
--repeat them <trollface.jpg>
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#include <stdio.h>
#include <cstdlib>
#include <vector>
#include <string>
int strToNumber(const char* start, const char* stop)
{
int sum = 0;
for (const char* c = start; c<stop; c++)
sum = sum * 10 + *c - 48;
import bluetooth as bt
import sys, time
from random import random
uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ee"
matches = bt.find_service(uuid=uuid)
if len(matches) == 0:
raw_input("No matching service found!")
sys.exit(0)