Skip to content

Instantly share code, notes, and snippets.

@JoshuaSkootsky
JoshuaSkootsky / UNLICENSE
Created September 14, 2020 12:25
Richard Geldreich's UNLICENSE for shooting your code into the public domain
See: https://richg42.blogspot.com/2020/08/lzham-and-crunch-ip-will-be-placed-into.html
// Begin here
THIS SOFTWARE IS IN THE PUBLIC DOMAIN
THIS IS FREE AND UNENCUMBERED SOFTWARE EXPLICITLY AND OVERTLY RELEASED AND CONTRIBUTED TO THE PUBLIC DOMAIN, PERMANENTLY, IRREVOCABLY AND UNCONDITIONALLY WAIVING ANY AND ALL CLAIM OF COPYRIGHT, IN PERPETUITY ON SEPTEMBER 15, 2020.
1. FALLBACK CLAUSES
@JoshuaSkootsky
JoshuaSkootsky / quicksort.js
Last active February 18, 2020 15:59
A functional quicksort in Javascript
// a functional quicksort in javascript
function qSort(arr) {
if (arr.length <= 1) return arr;
else {
const pivPoint = Math.floor(arr.length / 2);
const pivot = arr[pivPoint];
const newArr = [].concat(
qSort(arr.filter(x => x < pivot)),
arr.filter(x => x === pivot),
// npm i -D eslint eslint-config-prettier eslint-plugin-prettier prettier
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true
},
extends: ['eslint:recommended', 'prettier'],
globals: {
Atomics: 'readonly',
@JoshuaSkootsky
JoshuaSkootsky / less-bright.sh
Created January 26, 2020 13:44
Short little script for redshift. Specify brightness or use default value.
#!/bin/bash
#redshift script with an optional command line argument
# $1 = brightness percentage, 4 = 40%, optional command line argument
# usage: ./less-bright.sh 5 (for 50%)
#./less-bright.sh
brt=${1:-4}
echo "${brt}0% brightness"
@JoshuaSkootsky
JoshuaSkootsky / nodeForkBomb.js
Created January 21, 2020 19:28
Simple (elegant?) fork bombs for Node.js
// by Joshua Skootsky, January 21, 2020
const s = () => {
setInterval(s, 0);
setInterval(s, 0);
};
//IIFE
(function s(){
setInterval(s, 0);
setInterval(s, 0);
; This is a file I had lying around where I went through the beginning of SCIP (A scheme book) and translated it
; into Clojure as I went. Perfect for a gist?
; Joshua Skootsky, 2016
; See xkcd #312
Clojure : Scheme
def : define var

Keybase proof

I hereby claim:

  • I am JoshuaSkootsky on github.
  • I am jskoots (https://keybase.io/jskoots) on keybase.
  • I have a public key whose fingerprint is CD7D 934D D7D3 CEE5 03ED F9F2 4DEF E46D E213 7267

To claim this, I am signing this object: