Skip to content

Instantly share code, notes, and snippets.

View cjemorton's full-sized avatar

Clement Morton cjemorton

View GitHub Profile
@cjemorton
cjemorton / client.conf
Created July 30, 2020 07:15
Wireguard on FreeBSD with pf
[Interface]
PrivateKey = ***********************
Address = 192.168.10.2/32, fc::2/128
DNS = 1.1.1.1, 2606:4700:4700::1111
[Peer]
PublicKey = ***********************
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = endpoint.domain.tld:51820
@rlaphoenix
rlaphoenix / dvd-bible-by-phoenix.md
Last active April 4, 2024 21:27
The DVD-Video Bible, Written by @rlaphoenix
@butuzov
butuzov / mp3 to m4b.md
Created August 10, 2018 06:07
Convert mp3's to m4b using `ffmpeg`

Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).

URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL
@dave-kennedy
dave-kennedy / vnc.sh
Last active December 16, 2021 15:42
Bash script for controlling VNC sessions
#!/usr/bin/env bash
display_help() {
echo "Usage: `basename "$0"` OPTIONS ACTION
Options must be specified before any action, and only one action may be specified.
Options:
-g | --geometry size specify VNC session display size
# XCode Command Line Tools
>xcode-select --install
# Install Homebrew
>ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
>echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile
>source ~/.bash_profile
>brew tap homebrew/versions
@MarMed
MarMed / README.md
Last active May 1, 2024 12:18
Routing plex traffic through an SSH tunnel

Routing plex traffic through an SSH tunnel

This guide creates a reverse SSH tunnel to route all Plex server traffic through it.

Step 2 is done on the tunnel, all other steps are done on the plex server.

1. Setup SSH keys (if you already have key based authenthication setup skip to step 2)

On plex server:

@patriciogonzalezvivo
patriciogonzalezvivo / PythonSetup.md
Created October 7, 2014 23:17
How to install Python correctly on Mac OSX

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Add PATH to ~/.bash_profile and ~/.zshrc

export PATH=/usr/local/bin:$PATH
@benzittlau
benzittlau / gist:ec60e41ca2197909b57e
Created August 18, 2014 16:20
Authing for shaw open using command line
curl -L -v --data "username=<username>@shaw.ca&password=<password>&acpt=on&language=en" https://wifisignon.shaw.ca/api/login
@willurd
willurd / web-servers.md
Last active May 8, 2024 18:19
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@bjtitus
bjtitus / Perl SafeConnect Bypass
Created January 25, 2011 16:46
SafeConnect Bypass
#!/usr/bin/perl
use Net::Ping;
$host = "www.google.com";
while (1) {
$p = Net::Ping->new('icmp');
if ($p->ping($host)) {
print "$host is alive.\n";