Skip to content

Instantly share code, notes, and snippets.

@haakonn
haakonn / btno-nopaywall.user.js
Created December 4, 2016 12:51
btno-nopaywall.user.js - bt.no uten betalingsmurinnhold
// ==UserScript==
// @name btno-nopaywall
// @namespace haakonnilsen.com
// @include http://www.bt.no/*
// @version 1
// @grant none
// ==/UserScript==
function remAll(xpath) {
var els = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
@haakonn
haakonn / s3fs-delcache.sh
Created January 27, 2019 20:27
Script to expire files from s3fs-fuse's cache, with support for spaces in file names
#!/bin/bash
# Modified version of https://github.com/s3fs-fuse/s3fs-fuse/blob/master/test/sample_delcache.sh
# to support spaces in filenames (trade-off: filenames cannot contain "¼", which should be OK for most).
#
# This is unsupport sample deleting cache files script.
# So s3fs's local cache files(stats and objects) grow up,
# you need to delete these.
# This script deletes these files with total size limit
# by sorted atime of files.