Skip to content

Instantly share code, notes, and snippets.


Starbeamrainbowlabs sbrl

View GitHub Profile
for i; do
case "$i" in
sbrl / nanoModal-position-text.html
Last active Aug 29, 2015
A test of kylepaulsen/NanoModal to demonstrate a positioning bug.
View nanoModal-position-text.html
<!DOCTYPE html>
<title>nanoModal Test</title>
<h1>nanoModal Test</h1>
<p><strong>Scroll down and click the button</strong></p>
sbrl / valuevsreference.cs
Created Feb 5, 2015
A simple test of setting via value and setting via reference.
View valuevsreference.cs
using System;
using System.Diagnostics;
class ValueVsReference
public static void SetValue(int somenumber, int maxi)
for (int i = 0; i < maxi; i++)
somenumber = i;
sbrl / explode_adv.php
Created May 21, 2015
Probably (not) the world's most advanced string splitting function.
View explode_adv.php
* An advanced string splitting function written in PHP.
* Blog Post:
* Written by Starbeamrainbowlabs.
* Website:
* Twitter: @SBRLabs
function explode_adv($openers, $closers, $togglers, $delimiters, $str)
sbrl / first_test.js
Created Jun 2, 2015
ES6 Generators 1 Source Code used in a blog post.
View first_test.js
function *first_test()
yield "Hello!";
yield "I am a generator!";
yield "This is the last thing I will yield.";
var test = first_test(),
next =;
sbrl / maze.lua
Created Jun 24, 2015
A maze generation algorithm written in lua.
View maze.lua
-- Maze generation script
-- A test by @Starbeamrainbowlabs
-- Intelligent table printing function
-- From
sbrl / spelling-list-parser.cs
Created Sep 9, 2015
Code to parse wikipedia's list of spelling correction into a format that @TheTypoMaster's code can understand. The headers / footers must be removed manually.
View spelling-list-parser.cs
using System;
using System.IO;
public class Program
public static void Main()
StreamReader source = new StreamReader("wikipedia-spelling-corrections.txt");
StreamWriter dest = new StreamWriter("wikipedia-spelling-corrections-new.txt");
sbrl / node-update
Created Oct 6, 2015
A simple bash script to update Node.js to the latest version.
View node-update
echo "> Getting latest version number"
VERSION=v${1:-$(curl | sed -e 's/^.*"version":"\([^"]*\)".*$/\1/' | head -n 2 | tail -n -1 | cut -c 2-)}
echo "> Downloading $VERSION of node.js"
curl -s${VERSION}/${NODEJS}.tar.xz | tar xvfJ -
echo "> Setting ownership of /usr/local to $USER"
sbrl /
Created Dec 14, 2015
Keybase GitHub verification

Keybase proof

I hereby claim:

  • I am sbrl on github.
  • I am sbrl ( on keybase.
  • I have a public key whose fingerprint is C2F7 843F 9ADF 9FEE 264A CB9C C1C6 C0BB 001E 1725

To claim this, I am signing this object:

sbrl / drawShape.js
Last active Dec 19, 2015
Draws a n sided shape of radius r to the given context.
View drawShape.js
function drawShape(context, pos, sides, radius, rotation)
if(typeof radius !== "number")
rotation = 0;
console.log(`Drawing shape at ${pos.toString()}. Sides: ${sides}, Radius: ${radius}`);;
context.translate(pos.x, pos.y);