Skip to content

Instantly share code, notes, and snippets.

View tweibley's full-sized avatar

Taylor Weibley tweibley

View GitHub Profile
class UseUtf8mb4Characterset < ActiveRecord::Migration
def up
# The migration has been done following:
# - http://mathiasbynens.be/notes/mysql-utf8mb4#utf8-to-utf8mb4
# - http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-upgrading.html
database = Rails.configuration.database_configuration[Rails.env]["database"]
# Stop checking foreign keys
execute "SET foreign_key_checks = 0"
@m1ari
m1ari / RPI Streaming notes
Last active January 20, 2023 13:32
Stream raspberry pi camera over multicast and cope with raspivid exiting
This requires a couple of windows (or a screen/tmux session)
First create a fifo to use
mkfifo video.h264
In the first window start raspivid in the following way
while true; do raspivid -n -vf -hf -w 460 -h 270 -b 512000 -t 36000000 -o video.h264 -v; done
In the second window start vlc like:
cvlc video.h264 --sout "#duplicate{dst=std{access=udp,mux=ts,dst=239.255.1.2:1234}}" :demux=h264 --ttl 4 -I http --sout-keep -v --loop
@tmm1
tmm1 / README.md
Created February 10, 2011 05:33
no longer requires any proxies! just replace your enhancers.js. also see https://gist.github.com/821736