Skip to content

Instantly share code, notes, and snippets.

@navigatingbots
navigatingbots / .direnvrc
Last active June 14, 2025 10:42 — forked from ZhangChen199102/.direnvrc
Setup direnv + pyenv + pyenv-virtualenv
# use a certain pyenv version
use_python() {
if [ -n "$(which pyenv)" ]; then
local pyversion=$1
pyenv local ${pyversion}
fi
}
layout_virtualenv() {
local pyversion=$1
@navigatingbots
navigatingbots / SFileUploader.py
Last active July 6, 2020 17:36 — forked from Keshava11/SFileUploader.py
Simple python script to upload file to Dropbox.
import sys
import dropbox
from dropbox.files import WriteMode
from dropbox.exceptions import ApiError, AuthError
def uploadtodropbox(filetoupload='max2.jpg'):
'''https://gist.github.com/Keshava11/d14db1e22765e8de2670b8976f3c7efb'''
TOKEN = 'ENTER YOUR TOKEN HERE'
#LOCALFILE = '/home/xroom/Pictures/max2.jpg'
LOCALFILE = '/home/xroom/Pictures/' + filetoupload
@navigatingbots
navigatingbots / readme.md
Created April 20, 2019 13:37 — forked from max-mapper/readme.md
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