Skip to content

Instantly share code, notes, and snippets.

View joshdick's full-sized avatar
💭
😋

Josh Dick joshdick

💭
😋
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active April 19, 2024 19:48
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; // ¯\\_(ツ)_/¯
@chockenberry
chockenberry / df.sh
Created March 4, 2024 18:51
df Replacement
#!/bin/sh
if [ ! -z "$*" ]; then
echo "this is ~/bin/df, use /bin/df"
exit 1
fi
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w`
nosuid=`mount | grep -v "read-only" | grep "nosuid" | cut -f 3 -w`
@theacodes
theacodes / thread_emoji.py
Created December 2, 2023 17:42
Thread emoji
import threading
ANIMALS = list(
"🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🐔🐧🐦🐤🪿🦆🦉🦇🦇🐺🐗🐴🦄🫎🐝🪱🐛🦋🐌🐞🐜🪰🪲🪳🦟🦗🕷️🕸️🦂🐢🐍🦎🦖🦕🐙🦑🪼🦐🦞🦀🐡🐠🐟🐬🐳🐋🦈🦭🐊🐅🐆🦓🦍🦧🦣🐘🦛🦏🐪🐫🦒🦘🦬🐃🐂🐄🫏🐎🐖🐏🐑🦙🐐🦌🐕🐩🐈🐓🦃🦤🦚🦜🦢🦩🕊️🐇🦝🦨🦡🦫🦦🦥🐁🐀🐿️🦔🐉🐲"
)
ANIMALS_LEFT = []
THREAD_EMOJI = {}
def thread_emoji():
@melroy89
melroy89 / mastodon-docker-setup.md
Last active March 19, 2024 18:24 — forked from akuechl/mastodon-docker-setup.md
Mastodon Docker Setup - most complete and easiest guide online
@jasonsnell
jasonsnell / weatherkit-sampleproject.py
Last active August 10, 2023 21:35
WeatherKit API sample
#! /usr/bin/env python3
import time
import jwt
import json
import requests
from datetime import datetime
from collections import defaultdict
import matplotlib.pyplot as plt
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@rinsuki
rinsuki / Disable Apple Music.mobileconfig
Created October 19, 2021 00:02
Disable Apple Music in macOS 12 Monterey Music.app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string>Disable Apple Music in Music.app</string>
<key>PayloadDisplayName</key>
@kaaquist
kaaquist / podman_macos.md
Last active April 2, 2024 13:20
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@merlinmann
merlinmann / wisdom.md
Last active April 17, 2024 21:52
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

@luzhuomi
luzhuomi / pocketchip_debian10.md
Last active April 16, 2024 13:05
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.