Skip to content

Instantly share code, notes, and snippets.

View joshuatz's full-sized avatar

Joshua Tzucker joshuatz

View GitHub Profile
@ww9
ww9 / gist_markdown_examples.md
Last active May 3, 2024 10:34
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@miketromba
miketromba / deleteYoutubeWatchHistory.js
Last active April 13, 2024 18:02
Delete YouTube watch history with filter
const ENABLED = false // Keep this false while testing to verify that it's working correctly
const DELETE_INTERVAL = 1000 // Amount of time in MS to wait between deletion (more likely to fail with a small number)
// This filter should return a boolean (true == delete video, false == keep video)
const MIN_DURATION_MS = 1000 * 60 * 1.5 // 1:30 mins
const SHOULD_DELETE = videoElement => {
try {
// Get the duration string
@peltho
peltho / svelte.md
Last active April 2, 2024 07:43
Svelte cheatsheet
@nolanlawson
nolanlawson / offline-first-tools.md
Last active March 16, 2024 15:46
List of offline-first tools for web developers

Offline-first tools for web developers

A quick list of tools for building HTML/CSS/JS apps that work well offline. Ping me at @nolanlawson if I missed anything!

Hybrid app development

Tools for bundling your HTML/CSS/JS into a native app.

@CMCDragonkai
CMCDragonkai / ways_of_piping_and_redirection.sh
Last active March 12, 2024 11:06
BASH: Ways of Piping/Redirection and Heredoc Demonstration
# shells are an orchestration environment
# the language they provide is intended to orchestrate processes
# on the operating system
# if programs are functions, then all of the below are variants of function application
# anonymous pipe
echo "string" | cat
# herestring
cat <<< "string"
@zkat
zkat / index.js
Last active March 10, 2024 14:32
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@thaJeztah
thaJeztah / docker-examples.md
Last active January 14, 2024 02:00
Some docker examples

Commit, clone a container

To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.

For example;

docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd