Skip to content

Instantly share code, notes, and snippets.

arantius arantius

Block or report user

Report or block arantius

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
arantius / grant-none-shim.js
Last active Sep 8, 2019
Greasemonkey "@grant none" compatibility shim.
View grant-none-shim.js
The MIT License (MIT)
Copyright (c) 2014 Anthony Lieuallen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
arantius /
Created Mar 23, 2012
A very simple script to merge multiple RRD files, since none of those available seem to work.
#!/usr/bin/env python
"""Simple script to merge multiple RRD files together.
Accepts any number of RRD file names as arguments. Produces an "rrdtool dump"
style file on stdout. The last RRD file should have a slot for every possible
record in the resulting merged RRD.
Run something like:
$ python filea.rrd fileb.rrd filec.rrd | \
arantius / create-test-container.script
Last active Apr 6, 2019
How To Install Gentoo Onto Any OpenVZ VPS
View create-test-container.script
# vzctl create 200 --config unlimited --ostemplate \
> debian-6.0-x86 --ipadd --hostname guest
Creating container private area (debian-6.0-x86)
Performing postcreate actions
CT configuration saved to /etc/vz/conf/200.conf
Container private area was created
# vzctl start 200
Starting container...
Container is mounted
Adding IP address(es):
View everything-red.css
* { color: red !important; }
arantius / dependency1.js
Last active May 2, 2018
Sample user scripts, for testing Greasemonkey installs.
View dependency1.js
arantius / gm-get-set-demo-with-polyfill.user.js
Last active May 2, 2018
A simple persistent value test user script
View gm-get-set-demo-with-polyfill.user.js
'use strict';
// ==UserScript==
// @name GM set/get demo
// @description Exercises both GM.getValue() and GM.getValue(). Logs a counter which goes up by one, at each page load.
// @grant GM.getValue
// @grant GM_getValue
// @grant GM.setValue
// @grant GM_setValue
// @require
// ==/UserScript==
View gm-addstyle.js
function GM_addStyle(aCss) {
'use strict';
let head = document.getElementsByTagName('head')[0];
if (head) {
let style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.textContent = aCss;
return style;
arantius /
Last active Feb 16, 2018
Serves a user script, slowly
#!/usr/bin/env python
import time
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
PORT = 8000
USER_JS = """// ==UserScript==
// @name Red Border
arantius / red-border.user.js
Created Sep 7, 2017
A super simple user script with an unobtrusive way of being clear that it's running.
View red-border.user.js
// ==UserScript==
// @name Red Border
// @description A super simple user script with an unobtrusive way of being clear that it's running.
// @namespace test
// @include http*
// @version 1
// @grant none
// ==/UserScript== = '3px dashed red';
arantius / long-name-no-space.user.js
Created Jan 26, 2018
User scripts with long @name values.
View long-name-no-space.user.js
// ==UserScript==
// @name This_user_script_has_a_terribly_long_name_and_is_likely_to_break_UI_that_hasn't_been_crafted_specifically_to_handle_long_names.
// @grant none
// ==/UserScript==
// No_op.
You can’t perform that action at this time.