Skip to content

Instantly share code, notes, and snippets.

@tomoconnor
tomoconnor / miner.py
Last active August 29, 2015 13:57
Unicoin Miner script
# REPLACE YOUR FKEY value. You need to load a stack site, view the source, Ctrl-F and find your fkey, then put it into the command line as argv[1].
# so run it as python miner.py <your fkey>
# It also relies on Google Chrome's cookie lib to find the auth cookies.
import requests
import sqlite3
import os
from urlparse import urlparse
@tomoconnor
tomoconnor / gist:1771aaa4fdb92961ceaf
Last active August 29, 2015 14:02
Guess when I disabled IPAM... (It was pinging the entirety of RFC1918 every 10-odd seconds) and causing *huge* sw-forwarding queues on the router
1111 111 11 111 1111 111 11 111
544444454455444444544500004440004449009444000444000044400044590094440004
466575857522658586255400005760009769009667000665000098600068090096560006
100 **** *** **** *** **** *** **** **
90 **** *** **** *** **** *** **** **
80 *##* *#* *##* *#* *##* *#* *##* *#
70 *##* ### *##* ### *##* ### *##* ##
60 * *##* ### *##* ### *##* ### *##* ##
50 ***********************###***###****###***###****###***###****###***##
40 **********************####***###***####***###***####***###***####***##
@tomoconnor
tomoconnor / IPv6 Addressing
Last active August 29, 2015 14:02
IPv4 in IPv6 GRE tunnel config with 4 routers, BGP // Images and Topology: http://imgur.com/a/x3LKb
R1
g0/0 172.16.1.1 255.255.255.0 (to C2)
g1/0 FDE5:F699:8798::1
R2
g0/0 172.17.1.1 255.255.255.0 (to C1)
g1/0 FD5C:8D0A:8415::1 (to R3 g0/0)
R3
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", RUN+="/etc/init.d/gpsd restart", SYMLINK="GPS"
@tomoconnor
tomoconnor / i18n.sublime-snippet
Created December 29, 2014 22:26
Django i18n snippets and bindings
<snippet>
<content><![CDATA[
_($SELECTION$1)
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>i18n</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.python</scope>
<description>Wraps the selection in _(...) </description>
</snippet>
118041800 118 041 800 BHX Approach Squelch 30
118044967 118 044 967 Misc ATC
144466868 144 466 868 Worcestershire Voice
@tomoconnor
tomoconnor / munin.conf
Created February 6, 2011 22:33
Example munin.conf
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin
# Where to look for the HTML templates
tmpldir /etc/munin/templates
@tomoconnor
tomoconnor / munin-node.conf
Created February 6, 2011 22:45
Example Munin-node conf
#
# Example config-file for munin-node
#
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1
@tomoconnor
tomoconnor / gist:966745
Created May 11, 2011 16:00
Rewrite Rule to disallow non-cookie authed users
RewriteEngine On
RewriteCond %{HTTP_COOKIE} !^PHPSESSID [NC]
RewriteRule .*/? http://example.org/not-authorized [R]
@tomoconnor
tomoconnor / clientcertificate.sh
Created May 30, 2011 19:32
Create A Client Certificate
#!/bin/bash
# How To Create a client certificate
#As Root
cd /etc/ssl/myca
echo "Enter your username/tag!"
read USERNAME
echo "creating a CSR"
openssl req -config openssl.my.cnf -new -nodes -keyout private/${USERNAME}.key -out csr/${USERNAME}.csr -days 365
echo "Sign the CSR, get a Certificate"