Skip to content

Instantly share code, notes, and snippets.

View cassidoo's full-sized avatar
⌨️
sleepy

Cassidy Williams cassidoo

⌨️
sleepy
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active May 7, 2024 00:34
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
l = ['a','a','b','b','b','c','c']
compress :: [Char] -> [String]
compress l = group l >>= (\x -> [take 1 x, show $ length x])
main = do
putStrLn . show $ compress l
[
{
"id":1,
"num":"001",
"name":"Bulbasaur",
"img":"http://www.serebii.net/pokemongo/pokemon/001.png",
"type":[
"Grass",
"Poison"
],
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@fmaylinch
fmaylinch / Code cheat sheet.md
Last active October 28, 2022 22:54
Common lines of code in different languages for quick reference and comparison
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@rwaldron
rwaldron / barbie-bug-patch.md
Created November 21, 2014 02:09
Barbie Patches a Critical Bug

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@phardy
phardy / test.c
Created March 7, 2014 12:42
Pebble SDK default sketch
#include <pebble.h>
static Window *window;
static TextLayer *text_layer;
static void select_click_handler(ClickRecognizerRef recognizer, void *context) {
text_layer_set_text(text_layer, "Select");
}
static void up_click_handler(ClickRecognizerRef recognizer, void *context) {
@nanotaboada
nanotaboada / books.json
Last active December 9, 2023 12:24
A small-sized (8 items) sample collection of free Books in valid JSON (RFC 8259) format
{
"books":[
{
"isbn":"9781593279509",
"title":"Eloquent JavaScript, Third Edition",
"subtitle":"A Modern Introduction to Programming",
"author":"Marijn Haverbeke",
"published":"2018-12-04T00:00:00.000Z",
"publisher":"No Starch Press",
"pages":472,