Skip to content

Instantly share code, notes, and snippets.

View PromoFaux's full-sized avatar

Adam Warner PromoFaux

View GitHub Profile
@PromoFaux
PromoFaux / gist:8891b301e27a170fcf37
Last active August 29, 2015 14:16
Macro Mod script for minecraft to be used in conjunction with minebot (https://github.com/michaelzangl/minebot). Checks if hotbar contains Picks/shovels/dirt, and if not, refills the hotbar from the inventory. Could be edited to use without minebot.
&pick = "stone_pickaxe";
&shovel = "stone_shovel";
&pillar = "dirt";
IF(automine);
LOG("Automine Disabled");
ECHO("/minebot stop");
UNSET(automine);
ELSE;
LOG("Automine Enabled");
#!/usr/bin/env bash
# Pi-hole: A black hole for Internet advertisements
# by Jacob Salmela
# Network-wide ad blocking via your Raspberry Pi
#
# (c) 2015 by Jacob Salmela
# This file is part of Pi-hole.
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Verifying that "promofaux.id" is my Blockstack ID. https://onename.com/promofaux
<?php
$domains = Array();
$log = Array();
$ipv6 = file_exists("/etc/pihole/.useIPv6");
/******* Public Members ********/
function getSummaryData() {
global $ipv6;
$domains = readInBlockList();
$log = readInLog();
RESULT FROM WINDOWS:
ping doubleclick.net
Pinging doubleclick.net [192.168.1.253] with 32 bytes of data:
Reply from 192.168.1.253: bytes=32 time<1ms TTL=64
Reply from 192.168.1.253: bytes=32 time<1ms TTL=64
Reply from 192.168.1.253: bytes=32 time<1ms TTL=64
Reply from 192.168.1.253: bytes=32 time<1ms TTL=64
0 testingareallylongdomainnamethatdoesntexist.com
<?php
include('data.php');
header('Content-type: application/json');
$data = array();
if (isset($_GET['summaryRaw'])) {
$data = array_merge($data, getSummaryData());
}
https://test.com/test.html
https://test2.com/
https://test3.com
@PromoFaux
PromoFaux / Client.ovpn
Created March 12, 2017 22:55
VPN Server, only tunnel DNS requests on client device
client
dev tun
proto tcp
remote [REDACTED SERVER IP/DOMAIN] 1194
resolv-retry infinite
nobind
persist-key
persist-tun
key-direction 1
remote-cert-tls server
`touch /etc/pihole/badfile.file`