Skip to content

Instantly share code, notes, and snippets.

View bdougherty's full-sized avatar
🚀
(╯°□°)╯︵ ┻━┻

Brad Dougherty bdougherty

🚀
(╯°□°)╯︵ ┻━┻
View GitHub Profile
Verifying that "bdougherty.id" is my Blockstack ID. https://onename.com/bdougherty
@bdougherty
bdougherty / ascii.md
Last active January 4, 2018 08:10
ASCII Mode in the Vimeo Player

ASCII Mode in the Vimeo Player

When ASCII mode is activated, the resolution of the rendering is calculated based on the size of the player. The color resolution is half that of the monochrome. The frame rate is matched to the video, but it's capped at 30fps.

Rendering a frame

  1. The <video> is rendered into an invisible backing canvas at the render resolution (one pixel for each character).
  2. The image data is retrieved from the backing canvas.
  3. It iterates over each pixel and
    1. Determines the character to use for each pixel based on the brightness of the pixel.
@bdougherty
bdougherty / cloudSettings
Last active April 5, 2019 01:12
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-04-05T01:11:56.935Z","extensionVersion":"v3.2.8"}
# inspiration: https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
Disable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
choco feature enable -n allowGlobalConfirmation
cinst Microsoft-Windows-Subsystem-Linux -source windowsfeatures
# cinst 1password
cinst Firefox
@bdougherty
bdougherty / README.md
Last active April 1, 2022 05:54
Play the Benny Hill theme song while installing npm modules

Add the function somewhere to your dotfiles. Works better if you npm install -g benny-hill first.

import { writable, get } from 'svelte/store';
function makeBroadcastChannelSharedStore(name) {
let channel;
let receivedInitialValue = false;
function sendMessage(action, value = null) {
if (channel) {
channel.postMessage({ action, value });
}