Skip to content

Instantly share code, notes, and snippets.

Brian bdmorin

Block or report user

Report or block bdmorin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bdmorin
bdmorin / comcast injection.diff
Created Nov 29, 2018
Comcast forces PROXY connections for unencrypted traffic.
View comcast injection.diff
927,1514c927
< <script language="JavaScript" type="text/javascript">
< // Copyright (C) 2017 Comcast Cable Communications, LLC
< // Contact Us: http://customer.xfinity.com/contact-us/
< // Intended use of this message is to display critical and time sensitive notifications to customers.
< /*
< This program is free software; you can redistribute it and/or
< modify it under the terms of the GNU General Public License
< as published by the Free Software Foundation; either version 2
< of the License, or (at your option) any later version.
View jupyterwithoutdocker.sh
#!/bin/bash
# Yes you can do this in ansible
jdir = "~/jupyterLocal"
mkdir -p ${jdir}
pip install virtualenv
pip install virtualenvwrapper
TMPFILE=$(mktemp)
@bdmorin
bdmorin / prometheus.yml
Created Jun 15, 2018 — forked from skreuzer/prometheus.yml
smokeping style metrics in prometheus
View prometheus.yml
global:
evaluation_interval: 15s
rule_files:
- smokeping.rules
scrape_configs:
- job_name: 'blackbox_icmp'
metrics_path: /probe
params:
module: [icmp]
scrape_interval: 1s
@bdmorin
bdmorin / ELLL20180530.ipynb
Last active May 30, 2018
elll/ELLL20180530.ipynb
View ELLL20180530.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdmorin
bdmorin / 0_README.md
Created Dec 29, 2017 — forked from 0xcaff/0_README.md
OpenVPN, rTorrent and Flood Docker Compose Configuration
View 0_README.md

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 / diy-ngrok.md
Created Apr 20, 2017 — forked from byllc/diy-ngrok.md
This does something essentially equivalent to showoff.io if you have a publicly facing server...
View diy-ngrok.md

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"
}
View reverse_sshfs.md

2014-07-14 Reverse SSHFS mounts (fs push) https://blog.dhampir.no/content/reverse-sshfs-mounts-fs-push

sshfs is a neat way of mounting a file system from one machine to another over an encrypted ssh channel. However, for machine CLIENT to access a file system that resides on machine HOST, CLIENT must generally be able to log in to HOST. In addition, CLIENT must be able to connect to HOST in the first place, though a tunnel from HOST to CLIENT can easily mediate this if a connection can only be initiated in that direction.

However, the login itself may still be an issue. You might not want to type your password for HOST on CLIENT, or set up a keyless login using public/private keys. You might not entirely trust CLIENT, from which you want to access the file system. dpipe to the rescue.

Using dpipe, available in the “vde2” package on Debian (and, likely, derivatives), you can initiate the connection the other way and use sshfs in “slave mode”, in which it communicates over standard input and output instead o

View local.automount.sshfs.plist
<?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 / gist:acf12c586b9cda20eb7ac789e0a1a523
Created Mar 14, 2017 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line
View gist:acf12c586b9cda20eb7ac789e0a1a523

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

You can’t perform that action at this time.