Skip to content

Instantly share code, notes, and snippets.

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) {
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:

@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;
}
You can’t perform that action at this time.