Skip to content

Instantly share code, notes, and snippets.

@LeoColomb
LeoColomb / README.md
Last active January 15, 2023 19:42 — forked from morganrallen/_README.md
JankyBrowser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@ChrisK2
ChrisK2 / README.md
Last active August 29, 2015 14:07
ytdl_hook.lua

youtube-dl hook script for mpv

Now part of mpv

As of 079ecd7 (2014-11-19), the hook script is now integrated into mpv and will be avaiblable when compiled with LUA support. It is (currently) disabled by default, to enable it add --ytdl=yes to your command-line or ytdl=yes to your mpv.conf.

Open Issues

@JohnPostlethwait
JohnPostlethwait / synology_rtorrent_vpn_ip_bind.sh
Last active June 20, 2020 15:56
Dynamically Bind VPN IP Address to rTorrent on Synology
# Read full instructions here: http://tmblr.co/ZdZmSx1TH7iuF
# User setup, you should edit this if it differs (NO TRAILING SLASH!):
RTORRENT_INSTALL_DIR='/volume1/@appstore/rutorrent'
RTORRENT_SCRIPT_PATH='/var/packages/rutorrent/scripts/start-stop-status'
# Look for the "inet addr" line for ifconfig on the ppp0 device, get
# the actual IP, and assign it to the CURRENT_VPN_IP variable.
# If your VPN is on another network device, replace "ppp0" below with
# your device interface.
CURRENT_VPN_IP=$(ifconfig ppp0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}')
require 'formula'
class ZshNotify < Formula
homepage 'https://github.com/marzocchi/zsh-notify'
head 'https://github.com/marzocchi/zsh-notify.git'
depends_on 'terminal-notifier'
def install
prefix.install Dir['*']
@gene1wood
gene1wood / transmission-daemon
Created August 22, 2014 18:35
transmission-daemon sysconfig file to enable binding to an interface
# /etc/sysconfig/transmission-daemon
INTERFACE=ppp0 # Set this to the interface you want the daemon to bind to
if /sbin/ifconfig $INTERFACE >>/dev/null 2>&1; then
BIND_ADDR="`/sbin/ifconfig $INTERFACE | awk '$1 == \"inet\" {print $2}' | awk -F: '{print $2}'`"
else
BIND_ADDR="127.0.0.1"
fi
@Zehkul
Zehkul / Convert Script – README.md
Last active December 7, 2025 16:33
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active March 16, 2026 18:37
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@austinhappel
austinhappel / get-pia-openvpn-iptables.sh
Created January 20, 2014 19:54
Bash script for creating iptables directives to block all network connections, except for those through a PrivateInternetAccess.com openvpn tunnel.
#!/bin/bash
# vars
IPTABLESFILE="/tmp/iptables.vpn"
# Get openvpn configuration zip from PIA
echo "piavpn: getting openvpn.zip"
mkdir -p /tmp/pia
@Wysie
Wysie / gist:7487571
Last active February 3, 2023 02:10
Script to route traffic from home network through VPN selectively.Based off the discussion at http://www.smallnetbuilder.com/forums/showthread.php?t=9311The setup is a Roku box, a Home PC running Plex, and a Synology NAS with a torrent client running a web interface.The aim is to have all traffic from Roku go through the VPN, all traffic from th…
#!/bin/sh
# Script to route traffic from home network through VPN selectively.
# Based off the discussion at http://www.smallnetbuilder.com/forums/showthread.php?t=9311
# The setup is a Roku box, a Home PC running Plex, and a Synology NAS with a torrent client running a web interface.
# The aim is to have all traffic from Roku go through the VPN, all traffic from the Home PC (and all other devices) bypassing the VPN,
# and the Synology NAS using the VPN. There are however some exceptions. Since Plex uses port 32400, Roku has to bypass the VPN when
# using that port. In addition, port 9091 has to bypass the VPN as well in order to access the Synology torrent client.
#
# Requirements: Asuswrt-Merlin with OpenVPN already set up
@teffalump
teffalump / README.md
Last active November 5, 2025 12:05
OpenWRT adblock implementation

Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.