Skip to content

Instantly share code, notes, and snippets.

View kevlened's full-sized avatar
🏁

Len Boyette kevlened

🏁
View GitHub Profile
@kevlened
kevlened / semitones.js
Last active August 29, 2015 14:10
Semitone practice
var readline = require('readline');
var DIFFICULTY = 3; // Min is 1, Max is 11
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var notes = ['A','Bb','B','C','Db','D','Eb','E','F','Gb','G','Ab'];

Keybase proof

I hereby claim:

  • I am kevlened on github.
  • I am kevlened (https://keybase.io/kevlened) on keybase.
  • I have a public key whose fingerprint is EC87 6CD1 86DC A85F F0DF 6C7E 6EEB 9AC8 94D0 F7A3

To claim this, I am signing this object:

@kevlened
kevlened / doubleHelix.js
Last active August 29, 2015 14:16
Create a double helix in the terminal - http://jsfiddle.net/1ykp03kw/2/
// Open the console to watch
// http://jsfiddle.net/1ykp03kw/2/
var left = 'color:#6A287E'; // Dark purple
var right = 'color:#7F38EC'; // Light purple
var A = 'color:#736AFF'; // Blue
var T = 'color:#F5FF6B'; // Yellow
var G = 'color:#4CC417'; // Green
var C = 'color:#E42217'; // Red
var pairs = [[A, T], [C, G]];
@kevlened
kevlened / stopwatch.html
Last active August 29, 2015 14:17
A stopwatch that starts and stop by voice - http://jsfiddle.net/7bmjyve2/
<html>
<head>
<title>Microphone Stopwatch</title>
</head>
<body>
<div id="time"></div>
<script type='text/javascript'>
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
@kevlened
kevlened / hex.mjs
Created January 4, 2018 17:29
Fastest browser hex buffer operations
export function fromUint8Array(uint8Array) {
const view = new DataView(uint8Array.buffer)
const bl = view.byteLength, largeLength = bl - (bl % 4)
let hex = '', d = 0
for (; d < largeLength; d += 4) {
hex += ('00000000' + view.getUint32(d).toString(16)).slice(-8)
}
for (; d < bl; d++) {
let c = view.getUint8(d).toString(16)
hex += c.length < 2 ? '0' + c : c
@kevlened
kevlened / gist:734727365baf2e6fc04c
Last active May 9, 2018 05:00 — forked from vthibault/gist:bb30dcda2f61dc6addbf
Reverse Javascript2img.com "The Best and Simplest Javascript Obfuscator"
<!DOCTYPE html>
<html>
<head>
<title>Hacking Javascript2img.com</title>
<style type="text/css">
body { font-family:Arial; }
textarea { width:100%; height:300px; }
button { padding:20px; width:150px; height:50px; margin-top:20px; margin-bottom:20px; }
</style>
</head>
@kevlened
kevlened / tiny-sound.html
Created May 19, 2018 06:59
Tiniest Sound
<p onclick="this.onclick=0;with(new AudioContext)with(createOscillator())connect(destination),start()">o</p>
<svg onload='i=0;setInterval("with(Math)c.setAttribute(`r`,abs(sin(i++/20)*20))",15)'><circle id=c cx=20 cy=20 /></svg>
@kevlened
kevlened / tiny-canvas-square.html
Created May 19, 2018 20:36
draw a square on canvas
<canvas id=c /><svg onload="c.getContext`2d`.fillRect(0,0,l=c.width=c.height=99,l)"/>
@kevlened
kevlened / CONTRIBUTING.md
Created September 21, 2018 18:54
How to contribute to the Selenium repo