Skip to content

Instantly share code, notes, and snippets.

@montanaflynn
montanaflynn / context.go
Last active September 13, 2023 12:51
An example of using context to cancel goroutines between server handlers
package main
import (
"context"
"fmt"
"log"
"net/http"
"sync"
"time"
)
@phiresky
phiresky / motioninterpolation.vpy
Last active April 11, 2024 00:36
Realtime motion interpolating 60fps playback in mpv
# vim: set ft=python:
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645
# source: https://github.com/mpv-player/mpv/issues/2149
# source: https://github.com/mpv-player/mpv/issues/566
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy
import vapoursynth
core = vapoursynth.get_core()
@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
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@vertexclique
vertexclique / cracking.md
Last active April 8, 2024 18:24
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@xiaogwu
xiaogwu / JSONView-Theme-SublimeText-Monokai.css
Created July 4, 2013 20:44
Chrome Extension JSONView Theme based on Sublime Text Monokai Color Scheme
body {
white-space: pre;
font-family: monospace;
font-family: monaco;
font-size: 12px;
background: #252822;
color: white;
}
.property {
@daverogers
daverogers / footer.js
Created April 12, 2013 22:41
Assign "active" class to navbar item based on current page URL with jQuery