Skip to content

Instantly share code, notes, and snippets.

View polijn's full-sized avatar

polijn polijn

View GitHub Profile
@stekern
stekern / scrollingffmpeg.sh
Created April 11, 2019 09:55
Create a scrolling text video with a static image background using ffmpeg
# Creates a 20-second video with a scrolling text overlay.
# The image is named 'input.png', and the textfile it reads from is called 'yourfile.txt'.
# Create a video of the image
ffmpeg -loop 1 -t 20 -i input.png output.mp4
# Add scrolling text to the video
ffmpeg -i output.mp4 -filter_complex \
"[0]split[txt][orig];[txt]drawtext=fontfile=tahoma.ttf:fontsize=55:fontcolor=white:x=(w-text_w)/2+20:y=h-20*t:textfile='yourfile.txt':bordercolor=black:line_spacing=20:borderw=3[txt];[orig]crop=iw:50:0:0[orig];[txt][orig]overlay" \
-c:v libx264 -y -preset ultrafast -t 20 output_scrolling.mp4
@erogol
erogol / tts_example.ipynb
Last active July 19, 2025 20:07
TTS_example.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@niw
niw / fetch_nike_puls_all_activities.bash
Last active November 8, 2025 23:39
A simple NikePlus API description to fetch past run metrics
#!/usr/bin/env bash
# fetch_nike_puls_all_activities.bash
# A simple bash script to fetch all activities and metrics from NikePlus.
# See `nike_plus_api.md` for the API details.
readonly bearer_token="$1"
if [[ -z "$bearer_token" ]]; then
echo "Usage: $0 bearer_token"
exit
@celso
celso / init.vim
Last active June 15, 2025 23:54
Neovim setup for OSX users
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
@MightyPork
MightyPork / usb_hid_keys.h
Last active November 6, 2025 19:03
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm