Skip to content

Instantly share code, notes, and snippets.

View auyongcheemeng's full-sized avatar

Chee Meng Au Yong auyongcheemeng

View GitHub Profile
@jeffmbellucci
jeffmbellucci / disable_youtube_autoplay.js
Last active January 31, 2024 11:07
Turn off/disable YouTube autoplay feature
// To run, install GreaseMonkey or TamperMonkey extension in your browser
// Copy this code into new user script, and enable
// ==UserScript==
// @name Disable Youtube autoplay
// @version 1.0
// @description This script turns off Youtube's newest autoplay feature after the page loads
// @author Jeff Bellucci
// @match *://www.youtube.com/*
// @run-at document-start
@oogali
oogali / etc-nginx-conf.d-observium.conf
Created September 10, 2015 15:42
Observium Nginx configuration
server {
listen 80;
server_name observium.yourdomain.com;
access_log /var/log/nginx/observium-access_log combined;
error_log /var/log/nginx/observium-error_log warn;
root /opt/observium/html;
client_max_body_size 10m;
client_body_buffer_size 8K;
@max-mapper
max-mapper / readme.md
Last active May 21, 2022 11:02
ffmpeg youtube live event rtmp stream from raspberry pi with raspi camera (raspivid)
  1. compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
  2. create youtube 'live event'. get rtmp url + session id
  3. run this:
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>

you can tweak -b and -fps to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera

@hausen
hausen / gist:9501041
Last active August 29, 2015 13:57
"Fixing" xkcd 1340 (or making the most redonkulous clock ever)

"Fixing" xkcd 1340 (or making the most redonkulous clock ever)

Update: feeling adventurous? Clone or fork the xkcd clock! If you just want to see it in action or get a glimpse of how it works, keep reading.

Problem

The date in [xkcd's comic number 1340][1] [does not change][2].