Skip to content

Instantly share code, notes, and snippets.

Avatar

George Hilliard thirtythreeforty

View GitHub Profile
@thirtythreeforty
thirtythreeforty / gist:9f0b2bebd9ab129af719f7c4f065857d
Last active Oct 23, 2017
zfs 0.7 feature flags for 0.6-compatible pool
View gist:9f0b2bebd9ab129af719f7c4f065857d
zpool create [...] \
-o feature@extensible_dataset=disabled \
-o feature@userobj_accounting=disabled \
-o feature@large_dnode=disabled \
-o feature@sha512=disabled \
-o feature@skein=disabled \
-o feature@edonr=disabled \
-o feature@multi_vdev_crash_dump=disabled
@thirtythreeforty
thirtythreeforty / gist:09b92c5a3a6811841932eeecbf0dd6df
Last active Aug 17, 2018
OpenWRT imagebuilder commands for my customized firmware
View gist:09b92c5a3a6811841932eeecbf0dd6df
# Tiny imagebuilder required as of OpenWRT 18.06. Sub tl-wr841-v9 as needed:
make image PROFILE='tl-wr841-v11' PACKAGES=' \
luci \
luci-app-ddns libustream-mbedtls \
luci-app-wireguard luci-proto-wireguard \
-luci-proto-ppp -ppp -ppp-mod-pppoe \
-opkg \
'
make image PROFILE='archer-c7-v2' PACKAGES=' \
@thirtythreeforty
thirtythreeforty / CouponScrapper
Created Jun 27, 2016 — forked from mxrss/CouponScrapper
Uses powershell to scrape website content for coupon sites using their json api's.
View CouponScrapper
# this grabs offers from stater bros.com
$coupons = $null
$json = Invoke-WebRequest -Uri "http://coupons.staterbros.com/Coupons/Index?pageSize=600&currentPage=1&filter=0&sort=1&couponType=4&brandName=AllBrands&_=1383513834477" | select-object -Property Content
$StaterBriosrawObj = ConvertFrom-Json $json.Content
$StaterBriosrawObj.CouponsGrid | Group-Object { $_.Name } | Sort-Object -Descending Count
$staterCoupons = $StaterBriosrawObj.CouponsGrid
$coupons += $staterCoupons | Select-Object @{Name="Brand"; Expression={ $_.Name.tolower() -replace "[^A-Za-z0-9_.\$@ ]","" }}, #-replace [char]174, '' -replace [char]8482, '' } },
@{Name="Category";Expression={ "N/A"}},
@thirtythreeforty
thirtythreeforty / deadlock.patch
Created Aug 5, 2014
stun_sock.c patch to fix callback deadlock
View deadlock.patch
Index: pjnath/src/pjnath/stun_sock.c
===================================================================
--- pjnath/src/pjnath/stun_sock.c (revision 424)
+++ pjnath/src/pjnath/stun_sock.c (working copy)
@@ -317,7 +317,10 @@
pj_activesock_cfg_default(&activesock_cfg);
activesock_cfg.grp_lock = stun_sock->grp_lock;
activesock_cfg.async_cnt = cfg->async_cnt;
- activesock_cfg.concurrency = 0;
+ // this was set to 0 and whole_data was true, causing it to disallow concurrency. This change was made in bugfix #460.
@thirtythreeforty
thirtythreeforty / deadlock.patch
Created Jun 26, 2014
Patch to icedemo.c that causes PJLIB to deadlock
View deadlock.patch
diff --git a/pjsip-apps/src/samples/icedemo.c b/pjsip-apps/src/samples/icedemo.c
index 8dbba21..ed6fba9 100644
--- a/pjsip-apps/src/samples/icedemo.c
+++ b/pjsip-apps/src/samples/icedemo.c
@@ -72,6 +72,8 @@ static struct app_t
} icedemo;
+pj_mutex_t *application_mutex;
+
@thirtythreeforty
thirtythreeforty / tcphole.py
Last active Aug 29, 2015
A TCP hole puncher
View tcphole.py
#!/usr/bin/python3
# tcphole.py
# By George Hilliard ("thirtythreeforty")
# A simple TCP hole puncher for a firewall accepting only ESTABLISHED,RELATED packets
# This currently binds to the localhost address, although that's easy to fix by changing
# the bind() calls.
# This is based on the theory found at http://www.bford.info/pub/net/p2pnat/index.html#sec-tcp.
# You may use this software under the terms of the Creative Commons CC-0 license.