Skip to content

Instantly share code, notes, and snippets.

@tomac4t
tomac4t / keepassxc-build.sh
Last active July 9, 2020 03:30
Building KeePassXC
#!/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
@tomac4t
tomac4t / GoogleRecaptchaConnectivity.js
Last active January 30, 2020 14:15
Google Connectivity Check
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;
@tomac4t
tomac4t / remove-google-tracking.user.js
Last active July 29, 2023 03:45 — forked from k-barton/remove-google-tracking.user.js
Greasemonkey user script: Remove Google's link tracking
// ==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 () {