Skip to content

Instantly share code, notes, and snippets.

View billmei's full-sized avatar
☑️
Verified Profile

Bill Mei billmei

☑️
Verified Profile
View GitHub Profile
@billmei
billmei / piazza_hotkeys.js
Last active September 17, 2019 23:51 — forked from zzeleznick/piazza_hotkeys.js
Provides hotkey support for piazza. Paste into the Chrome Dev Console for use. This fork changes the keycodes to Gmail/Vim defaults.
(function() {
/*
Provides hotkey support for navigating many posts on piazza.
1) e + alt: archives the current post and navigates to the previous post
2) u + alt: marks the current post as unread and navigates to the previous post
3) k + alt: navigates to the more recent post from current
4) j + alt: navigates to the older post
*/
// keycodes: http://keycode.info/
const keyArchive = 69; // alt + e
@billmei
billmei / timelapse.md
Last active January 14, 2022 10:54 — forked from Sybrand/timelapse.md
ffmpeg time-lapse

Convert sequence of GoPro Hero 6 Black JPEG images to MKV / MP4 video

ffmpeg \
  -r 30000/1001 \
  -pattern_type glob -i '*.JPG' \
  -vf "crop=in_w:in_w*9/16,scale=3840:-2" \
  -sws_flags lanczos \
  -pix_fmt yuv420p \
 -vcodec libx264 \
import os
"""
Two things are wrong with Django's default `SECRET_KEY` system:
1. It is not random but pseudo-random
2. It saves and displays the SECRET_KEY in `settings.py`
This snippet
1. uses base 64 encode instead to generate a random key