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
// Some convenience- functions for removing elements | |
function removeElementByXpath(xpath) { | |
return removeElement(getElementByXpath(xpath)); | |
} | |
function getElementByXpath(xpath) { | |
return document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
} |
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 Alternativeto.net ~Free != Free | |
// @namespace https://gist.github.com/fisknils | |
// @version 0.1 | |
// @description This script removes any listing marked as "Freemium" and "Free*", when the site's filter is set to free. | |
// @author Fisknils | |
// @match *://alternativeto.net/*?license=free* | |
// @grant none | |
// ==/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
{ | |
"måndag":{"butik":"stängt","hämtningar":"09-16"}, | |
"tisdag":{"butik":"16-18","hämtningar":"09-16"}, | |
"onsdag":{"butik":"14-18","hämtningar":"09-16"}, | |
"torsdag":{"butik":"stängt","hämtningar":"09-16"}, | |
"fredag":{"butik":"stängt","hämtningar":"09-15"}, | |
"lördag":{"butik":"10-14","hämtningar":"10-14"}, | |
"söndag":{"butik":"stängt","hämtningar":"stängt"} | |
} |
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
<?PHP | |
// returns the hex value of a single character (if a string is supplied, only the first character will be processed) | |
function charhex($c) { | |
return dechex(ord($c[0])); | |
} | |
// returns the hex values of each character in string with optional delimiter | |
function stringhex($s,$delimiter="") { |
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
#include <Misc.au3> | |
#include <Array.au3> | |
AutoItSetOption("PixelCoordMode",2) | |
AutoItSetOption("MouseCoordMode",2) | |
HotKeySet("{ESC}", "Terminate") | |
HotKeySet("{PAUSE}", "Toggle") | |
$enabled = True |
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
// patchjob javascript to parse the contents of | |
// https://www.coinbase.com/accounts/*# | |
// since there's no export | |
// work in progress | |
// this just gets each line's source and target currency + volumes and prints it as a multi- dimensional object | |
// into the developer console | |
// you should NEVER run ANY scripts on ANY authenticated page unless you understand EXACTLY what the code does | |
// OR if you WANT trouble. |
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
// including jquery in your electron body. | |
// | |
// https://stackoverflow.com/questions/32621988/electron-jquery-is-not-defined | |
// https://stackoverflow.com/a/37480521/4023754 | |
<!-- Insert this line above script imports --> | |
if (typeof module === 'object') {window.module = module; module = undefined;} | |
<!-- normal script imports etc --> | |
[ |
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 My Elastic Userscript | |
// @namespace https://gist.github.com/fisknils | |
// @version 0.1 | |
// @description Skeleton userscript with maybe a bit too much included. | |
// @author fisknils | |
// @include http* | |
// @require https://code.jquery.com/jquery-2.2.4.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/preact/8.2.6/preact.js | |
// @require |
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(){ | |
/* returns an array containing the attr values of matching elements */ | |
jQuery.fn.extend({ | |
eachattr: function(attr){ | |
let r = []; | |
$(this).each(function(){ | |
r.push($(this).attr(attr)); | |
}); | |
return r; | |
} |
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
(()=>{ | |
const localStorage_extension = (function(){ | |
this._get = (label=>{ | |
return JSON.parse(localStorage.getItem(label)); | |
}); | |
this._put = ((label,items)=>{ | |
return localStorage.setItem(label,JSON.stringify(items)); | |
}); |
OlderNewer