Skip to content

Instantly share code, notes, and snippets.

View kevlened's full-sized avatar
🏁

Len Boyette kevlened

🏁
View GitHub Profile
@kevlened
kevlened / readme.md
Last active January 25, 2023 18:44
Edit page

steps:

  1. bookmark the current page (in Chrome, you can drag the lock next to the url to the bookmarks bar)
  2. right-click the bookmark
  3. click Edit...
  4. change the url to the following (copy/paste)
javascript:document.body.contentEditable=document.body.contentEditable!='true'
@kevlened
kevlened / CONTRIBUTING.md
Created September 21, 2018 18:54
How to contribute to the Selenium repo
@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)"/>
<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-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>
@kevlened
kevlened / analytics.js
Last active April 3, 2024 19:21
Manually Deobfuscated Google Analytics js
/*
*
* This is currently a WIP
* Source originally pulled 3/28/2018
* https://www.google-analytics.com/analytics.js
*
* Tools:
* 1) Google Chrome source formatter
* 2) VS Code right-click rename symbol
*
@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 / 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 / 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]];