Skip to content

Instantly share code, notes, and snippets.

@Firsh
Firsh / lwp-cloudflare-dyndns.sh
Last active April 23, 2025 15:56
Cloudflare as Dynamic DNS
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_email="[email protected]"
auth_key="global_api_key_goes_here"
zone_name="example.com"
@chrisstubbs93
chrisstubbs93 / ffmpeg.sh
Last active March 14, 2025 10:51
auto-restart FFMPEG when it stops sending frames to youtube
#!/bin/sh
sleep 5
ffmpeg -re -f mjpeg -r 10 -i "http://localhost/?action=stream" -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 1k -strict experimental -s 640x360 -vcodec h264 -pix_fmt yuv420p -g 20 -vb 500k -preset ultrafast -crf 31 -r 10 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx" 2> /home/pi/ffmpeg.log
@jaytaylor
jaytaylor / ._README.md
Last active March 4, 2024 23:39
URL Encoding in pure bash / sed.
@tdr2d
tdr2d / docker_cleanup.sh
Last active March 10, 2021 01:37
Remove all unused docker containers, remove all docker volumes, cleanup networks
#!/usr/bin/env bash
removevolumes() {
sudo docker volume rm $(sudo docker volume ls -qf dangling=true)
sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm
}
removenetwork() {
sudo docker network ls
sudo docker network ls | grep "bridge"
@carlos22
carlos22 / install-syncthing-smartos.md
Last active November 10, 2018 16:38
install syncthing on smartos
pkgin update
pkgin in syncthing
groupadd users
useradd -d /srv/syncthing -c "syncthing user" -s /usr/bin/false -g users synctg
mkdir -p /srv/syncthing
chown synctg:users /srv/syncthing
svccfg import syncthing.xml
svcadm enable syncthing
@julianpoy
julianpoy / .Xresources
Created May 17, 2018 06:05
X1C6 DPI Linux
Xft.dpi: 160
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
@h
h / Unsubscribe All
Last active March 3, 2021 01:49
Delete all Email Subscriptions
Add the following gmail filters to trash all messages from useless subscription lists.
Do this for both gmail filters below:
1. Login to Gmail and click Settings->Filters->Create a new filter
2. Paste the Gmail filter into the "Has the words" text field
3. Click "Create filter with this Search »", then "Delete it", then "Create filter"
# Gmail filter that deletes all subscription spam (anything with an "unsubscribe" button):
@davidrleonard
davidrleonard / add-team-to-repos.js
Last active May 8, 2024 15:11
Add a new team to all Github repos in an organization
/*
* Adds a team to all the repos in a Github organization. This is a tedious
* process in the UI. You'll need a newer version of node to run this (e.g 9+)
* because it uses async/await.
*
* Instructions:
*
* 1. Copy this file somewhere on your computer, e.g. ~/addteamrepos.js
* 2. Fill in the uppercase variables below with the right values
* 3. Run this file: `$ node ~/addteamrepos.js`

Keybase proof

I hereby claim:

  • I am fixator10 on github.
  • I am fixator10 (https://keybase.io/fixator10) on keybase.
  • I have a public key ASBtWY1rjOEOY9fcyFD2WDiJTAfdumYZOtuM9g0ElqOVOgo

To claim this, I am signing this object:

@dideler
dideler / bot.rb
Last active October 23, 2025 16:33
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#