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
# pythoneval.py | |
import sys | |
import re | |
from code import InteractiveInterpreter | |
import znc | |
class pythoneval(znc.Module, InteractiveInterpreter): | |
# module_types makes it unable to load |
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
#!/bin/bash | |
# Author: Alexander Schulz | |
VHOSTEN="/etc/nginx/sites-enabled/" | |
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]] | |
then | |
echo 'Usage: n2dissite VHOST' | |
echo 'Disables Nginxs virtualhost VHOST.' |
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 AnimeBytes Notifications | |
// @author potatoe | |
// @version 2.6.3.X.4.11 | |
// @description AnimeBytes SUPER Notifications! super! s-...super..? || Shows toasty notifications for various things! | |
// @icon https://animebytes.tv/favicon.ico | |
// @include https://animebytes.tv/* | |
// @match https://animebytes.tv/* | |
// @downloadURL https://ab.nope.bz/userscripts/notifications/ab_notifications.beta.user.js | |
// @updateURL https://ab.nope.bz/userscripts/notifications/ab_notifications.beta.user.js |
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
/*/ | |
* This simulates JQuery's constructor functionality as best as easiest possible | |
* Some minor things that I never really use (like calling select() without arguments, | |
* or some ambiguous css paths not being interpreted by querySelectorAll correctly) | |
* might not really work, but I personally don't see much need to make it more complicated | |
* to work around them currently. | |
/*/ | |
var select = function (s, c) { | |
if (!c || c == null) | |
c = document; |
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 Cache () { | |
"use strict"; | |
if (this.constructor != Cache) throw new TypeError("Constructor Cache requires 'new'"); | |
/* | |
A dumb, simple cache, to make access to cross-pageload variables easy and manageable. | |
All cache times are in milliseconds. | |
*/ | |
var storage = window['localStorage']; |
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 | |
/** | |
* Twig REPL hack | |
* | |
* Arnaud Le Blanc <arnaud.lb@gmail.com> | |
*/ | |
require 'vendor/twig/twig/lib/Twig/Autoloader.php'; | |
Twig_Autoloader::register(); |
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
/* | |
* Recurses through an object to search for an identifier. | |
* Identifier is a RegExp. | |
* Returns either the first match or false. | |
*/ | |
function search (obj, term) { | |
for (var k in obj) { | |
if (obj.hasOwnProperty(k)) { | |
if (k == term) return k; |
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
/** | |
* GenericObject / objectify.js | |
* | |
* Creating new objects with neat setters and getters over again is annoying, so let's automate it. | |
* | |
* @author Alexander Schulz (alex@nope.bz) | |
*/ | |
var Objectify = (function () { | |
"use strict"; |
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 () { | |
var S4 = function (n, d) { | |
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1) + (n > 1 ? (d || '') + S4(n - 1, d) : ''); | |
}; | |
return (String.fromCharCode(97 + Math.floor(Math.random() * 26)) + S4().substring(1) + S4(5, '-') + S4(2)); | |
})(); |
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 fetchPage(link, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('get', link); | |
xhr.onreadystatechange = function () { | |
if (xhr.readyState == 4 && xhr.status == 200) | |
callback.call(xhr, xhr); | |
}; | |
xhr.send(); |
OlderNewer