Skip to content

Instantly share code, notes, and snippets.

Domenic Horner tgxn

Block or report user

Report or block tgxn

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
@tgxn
tgxn / whitelist.php
Created Aug 20, 2015
Whitelist Sites with CF Header
View whitelist.php
$whitelistCountries = array(
"NZ"
);
if(isset($_SERVER["HTTP_CF_IPCOUNTRY"])) {
$block = true;
for($whitelistCountries as $country) {
if($_SERVER["HTTP_CF_IPCOUNTRY"] == $country) {
$block = false;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am tgxn on github.
  • I am tgxn (https://keybase.io/tgxn) on keybase.
  • I have a public key whose fingerprint is 26FC 9725 6293 66E7 7849 445B 478B 5D86 EF61 5FF4

To claim this, I am signing this object:

View extract-bans.js
var getElementByXpath = function(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
};
var mainUserElem = getElementByXpath("//html/body/div[1]/div/div/div/div/div/div/div[2]/div[2]/div[1]/div/div[2]");
var users = [];
for (var index in mainUserElem) {
if(index.indexOf('__reactEventHandlers') !== -1) {
You can’t perform that action at this time.