Skip to content

Instantly share code, notes, and snippets.

View bdmorin's full-sized avatar
👁️‍🗨️
the horrors persist, but so do l

Brian bdmorin

👁️‍🗨️
the horrors persist, but so do l
View GitHub Profile
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
#! /usr/bin/env python3.2
"""
mozreplcurl - Wrapper around curl that adds on firefox's cookies, and updates firefox's cookie db after curl finishes running.
To update firefox's cookies db when firefox is running, mozrepl is required to be installed.
"""
import sys
import re
from telnetlib import Telnet
from argparse import ArgumentParser
@bdmorin
bdmorin / gist:acf12c586b9cda20eb7ac789e0a1a523
Created March 14, 2017 14:00 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>local.automount.sshfs</string>
<key>ProgramArguments</key>
<array>
@bdmorin
bdmorin / diy-ngrok.md
Created April 20, 2017 22:42 — forked from byllc/diy-ngrok.md
This does something essentially equivalent to showoff.io if you have a publicly facing server...

This is basically diy ngrok

Usage: show

function show() {
    DOMAIN=".example.com"
    REMOTE="$2$DOMAIN"
    ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost"
}
@bdmorin
bdmorin / 0_README.md
Created December 29, 2017 00:08 — forked from 0xcaff/0_README.md
OpenVPN, rTorrent and Flood Docker Compose Configuration

The Setup

This is a docker-compose file for a simple, secure torrent setup. It includes [rTorrent] (a torrent client), [flood] (a web interface for rTorrent), [OpenVPN] (to tunnel traffic through your ISP) and a simple iptables firewall to allow rTorrent to only access the internet through a VPN.

To run everything, put your open vpn configuration file in ./vpn.ovpn and the other configuration files from this gist in a directory then go to that

@bdmorin
bdmorin / prometheus.yml
Created June 15, 2018 20:26 — forked from skreuzer/prometheus.yml
smokeping style metrics in prometheus
global:
evaluation_interval: 15s
rule_files:
- smokeping.rules
scrape_configs:
- job_name: 'blackbox_icmp'
metrics_path: /probe
params:
module: [icmp]
scrape_interval: 1s

Arch Linux ARM on Crostini

Screenshot

I got Arch Linux ARM installed on a Lenovo Chromebook Duet! I mostly used the instructions from the Arch Wiki as reference.

0. Before we begin

@bdmorin
bdmorin / crostini-bootstrap.sh
Last active July 12, 2022 17:30 — forked from dwallraff/bootstrap.sh
Crostini penguin bootstrap script -- curl -sL dwallraff.com/bootstrap | bash
#! /usr/bin/env bash
#-- Dave Wallraff
# -- bdmorin@gmail.com
### bootstrap crostini container
# curl -sL https://gist.githubusercontent.com/bdmorin/54e15b22a57eea69be8b880fa2569225/raw/6517ceb92a750597875c92ad35f227eb0a3747e1/crostini-bootstrap.sh | bash
# Do all this in ansible, duh
# wrap in a function for curl|bash