This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'MaxMind-DB-Reader-php/autoload.php'; | |
use MaxMind\Db\Reader; | |
$ipAddress = $_SERVER['REMOTE_ADDR']; | |
if (isset ($_POST["ip"]) ) { | |
if (filter_var($_POST["ip"], FILTER_VALIDATE_IP)) { | |
$ipAddress = $_POST["ip"]; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
# Get the new version | |
Version=`curl -sf 'https://api.github.com/repos/keepassxreboot/keepassxc/releases/latest' | python -c "import sys, json; print json.load(sys.stdin)['tag_name']"`; | |
curl -Lf --proxy socks5://127.0.0.1:1080 "https://github.com/keepassxreboot/keepassxc/releases/download/"$Version"/keepassxc-"$Version"-src.tar.xz" | tar -Jxv; | |
cd keepassxc-$Version; | |
unset Version; | |
if [ -d "build" ]; then | |
rm -rf build; | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connectivityFirstCheck = true; | |
var connectivityTestPassed; | |
// https://github.com/SukkaW/DisqusJS/blob/master/src/disqus.js#L235 | |
const connectivityCheck = () => { | |
connectivityFirstCheck = false; | |
const img = new Image; | |
const timeout = setTimeout(() => { | |
img.onerror = img.onload = null; | |
connectivityTestPassed = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Google's link tracking | |
// @description Removes onmousedown event from external Google links to allow direct links | |
// @namespace https://gist.github.com/k-barton | |
// @include https://www.google.com/search* | |
// @version 0.2.0 | |
// @grant unsafeWindow | |
// @run-at document-end | |
// ==/UserScript== | |
(function () { |
NewerOlder