Skip to content

Instantly share code, notes, and snippets.

View SoftCreatR's full-sized avatar
👻
Boo!

Sascha Greuel SoftCreatR

👻
Boo!
  • Gladbeck, Germany
  • 23:13 (UTC +01:00)
View GitHub Profile
<?php
namespace wcf\system\pushover\API;
use wcf\util\ArrayUtil;
use wcf\util\HTTPRequest;
use wcf\util\JSON;
use wcf\util\StringUtil;
/**
* Pushover API
*
@SoftCreatR
SoftCreatR / gist:9558833
Last active August 29, 2015 13:57
Just playing around
$("a.externalURL").each(function() {
$(this).removeClass('externalURL');
$(this).prepend('<img src="//www.google.com/s2/favicons?domain=' + this.href + '" alt="" />&nbsp;');
});
@SoftCreatR
SoftCreatR / gist:9754783
Last active August 29, 2015 13:57
Lazy inline post editing
$(".messageContent").dblclick(function() {
var $btn = $(".messageOptions a.button.jsMessageEditButton", this);
if($btn.length) {
$btn.dblclick();
}
});
/**
* Message autosave related classes for WCF (WIP)
*
* @author Sascha Greuel
* @copyright 2014 Sascha Greuel
* @license Creative Commons Attribution-NoDerivatives <http://creativecommons.org/licenses/by-nd/4.0/legalcode>
*/
/**
* Displays and manages an info box for autosaved contents.
iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAAACVBMVEVTU1P///9TU1P8g2f9AAAAAnRSTlMAAHaTzTgAAAB0SURBVHhe1dMxCgMxDAXRIaVOkXrvs/f79ZwyEGNITKwUgcBOZR4upEKcSxeCmSrAFko1r5Cv4J8A6EGzgwLQQAdHD5ljbUFU08Gz8AOwgWX1HlBNC6WyBVWMOBpq5C2pz3ALUIGsP1ZAKtznmxoAAtc5wgegV/QjpyQHeQAAAABJRU5ErkJggg==iVBORw0KGgoAAAANSUhEUgAAAIAAAACAAgMAAAC+UIlYAAAACVBMVEVTU1P///9TU1P8g2f9AAAAAnRSTlMAAHaTzTgAAACFSURBVHhe7dY9CoBADITRqfd+XnJOKco6EC32h4VRzFdEMK9II4it0fdAggT3WEPNAKjmAfxA2UEC7QzA/mHxcaMNFDoBz6k8gNqT8IAQ8FeAtQBTAG4QBWxAAgZALY5xPkNtoARiYwDAWlDYC+pl1FBNoFYBXqOMAF0ooPed4G2/7gkS7LQn0KpfZWb2AAAAAElFTkSuQmCC
# Sascha Greuel <sascha@softcreatr.de>
# 2014-08-06
# Rev. 1
# ==========
# WoltLab Community Framework
# ==========
if ($args ~ "page=Portal") {
rewrite ^.*$ /index.php/Dashboard/? permanent;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SoftCreatR
SoftCreatR / autopoke.user.js
Last active August 29, 2015 14:05
Facebook Autopoke
// ==UserScript==
// @name Facebook Autopoke
// @icon http://i.imgur.com/5ShnMqG.png
// @namespace http://www.softcreatr.de
// @author Sascha Greuel
// @description Automatically pokes back people.
// @version 1.9.0
// @run-at document-end
// @grant none
//
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
function parseUri (str) {
var o = parseUri.options,
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
uri = {},
i = 14;
<?php
namespace wcf\util;
/**
* Extended math-related functions.
*
* @author Sascha Greuel <sascha@softcreatr.de>
* @copyright Sascha Greuel
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf