This file contains 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
#!/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 simple-merge-rrd.py filea.rrd fileb.rrd filec.rrd | \ |
This file contains 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 Download Test | |
// @description Script to test download/install. At least one: require, resource, icon. | |
// @icon /favicon.ico | |
// @require require.js | |
// @resource resource resource.txt | |
// @grant GM.getResourceUrl | |
// ==/UserScript== | |
(async function() { |
This file contains 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 CSS Resource Test | |
// @version 1 | |
// @grant GM.getResourceUrl | |
// @resource css test.css | |
// ==/UserScript== | |
(async function() { | |
var link = document.createElement('link'); | |
link.rel = 'stylesheet'; |
This file contains 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 URLSearchParams test | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// Test for https://github.com/greasemonkey/greasemonkey/issues/3136 | |
const searchParams = new URLSearchParams("key1=value1&key2=value2"); | |
for (const key of searchParams.keys()) { |
This file contains 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 Bad match | |
// @description A user script with an improperly formatted @match, which should not install. | |
// @version 1 | |
// @grant none | |
// @match abc | |
// ==/UserScript== |
This file contains 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 Update Test | |
// @namespace test | |
// @description Test whether updates really work | |
// @include * | |
// @version 2 | |
// ==/UserScript== | |
dump('Update test version 2!\n'); |
This file contains 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
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; | |
head.appendChild(style); | |
return style; | |
} |
This file contains 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 Regular expression include, slash escape test | |
// @namespace https://github.com/arantius | |
// @include /^https://gist.github.com// | |
// ==/UserScript== | |
GM_addStyle('body, #main { background-color: green !important; }'); |
This file contains 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
/* | |
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 |
This file contains 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
'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 https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js | |
// ==/UserScript== |
NewerOlder