Skip to content

Instantly share code, notes, and snippets.

  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 17:23
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; // ¯\\_(ツ)_/¯
@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active March 28, 2024 17:21
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@TheSunCat
TheSunCat / DisblockOrigin.theme.css
Last active March 28, 2024 17:20
Hide all Nitro & Boost upsells in Discord!
/**
* @name Disblock Origin
* @author TheSunCat and contributors
* @description Hide all Nitro & Boost upsells on Discord!
* @source https://gist.github.com/TheSunCat/58fedaa19d6154ef3e4b2b676c286906
*/
/* ------------------ */
/* Hide Nitro upsells */
/* ------------------ */
@evasilev
evasilev / docker-compose.yaml
Created March 28, 2024 17:20 — forked from BoredHackerBlog/docker-compose.yaml
grafana loki docker-compose file and vector settings
version: "3"
networks:
loki:
services:
loki:
image: grafana/loki:2.4.0
volumes:
- ./loki:/etc/loki
@walkermatt
walkermatt / debounce.py
Created June 4, 2012 21:44
A debounce function decorator in Python similar to the one in underscore.js, tested with 2.7
from threading import Timer
def debounce(wait):
""" Decorator that will postpone a functions
execution until after wait seconds
have elapsed since the last time it was invoked. """
def decorator(fn):
def debounced(*args, **kwargs):
def call_it():
@MarsMSJ
MarsMSJ / WebM_to_ProRes.md
Last active March 28, 2024 17:17
Convert your WebM (VP9) files to ProRes

Convert your WebM to ProRes

Like many of you lucky enough to purchase a PS5, I have been enjoying my time with the new console. One feature I started playing with is the video game capture feature via the "Create" button. I have been capturing my favorite clips here and there and selected the best ones to include a video I want to share. Unfortunately, I ran into trouble. None of my video editing applications (FCPX, DaVinci) support the WebM container. My favorite clips were all captured using WebM.

If you like me have all your favorite clips stuck in WebM then I have a solution for you. FFmpeg! This free software includes a ProRes encoder that simple enough to use works on Davinci Resolve (free version available) and Adobe Premiere! (FCPX of course supports ProRes.) See links below.

MacOS (and Linux)

On the MacOS, you can use the following command (Bash) to convert all WebM files in the current directory to ProRes.

@maxtruxa
maxtruxa / Antonyms.md
Last active March 28, 2024 17:17
A list of common terms used in programming and their respective antonyms.

Antonym List

Note: The table headings (positive/negative) are not necessarily meaningful.

Positive Negative
acquire release
add remove (e.g. an item), subtract (arithmetic)
advance retreat
allocate deallocate (correct), free (common)
allow deny
## OpenShift4 pull-secret:
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned)
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
- `$ oc registry login --to ~/some-dir/pull-secret`
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
make the pull-secret multi-line.
@fcas
fcas / diversity.md
Last active March 28, 2024 17:15
Diversity refs