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 | |
/** | |
* PHP function to calculate an alphanumeric abbreviation for a string based on capitalization and | |
* length. Useful for generating semi-unique (but still human-interpretable) identifiers from things | |
* like class or plugin names. | |
* | |
* PHP version 5 | |
* | |
* LICENSE: GPL v3 - Look it up! | |
* |
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
expandShortenedURL = function( str_shortenedURL, fn_callback ) { | |
if( str_shortenedURL.indexOf( "http://" ) < 0 ) | |
str_shortenedURL = "http://" + str_shortenedURL; | |
return longURLAPICall( "expand", { title: 1, url: str_shortenedURL }, fn_callback ); | |
}; |
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
// Grab the shortened URL services from api.longurl.org/v2/services, generate a regex pattern for all | |
function generateShortenedURLRegEx( fn_callback ) { | |
longURLAPICall( "services", {}, function( data ) { | |
var regExString = "(?:https?:\\/\\/)?(?:"; | |
var serviceCount = 0; | |
var regExp; | |
for( var service in data ) { | |
if( data.hasOwnProperty( service ) ) { | |
if( service.charAt( service.length - 1 ) == '.' ) |
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
/(?:https?:\/\/)?(?:(?:0rz\.tw)|(?:1link\.in)|(?:1url\.com)|(?:2\.gp)|(?:2big\.at)|(?:2tu\.us)|(?:3\.ly)|(?:307\.to)|(?:4ms\.me)|(?:4sq\.com)|(?:4url\.cc)|(?:6url\.com)|(?:7\.ly)|(?:a\.gg)|(?:a\.nf)|(?:aa\.cx)|(?:abcurl\.net)|(?:ad\.vu)|(?:adf\.ly)|(?:adjix\.com)|(?:afx\.cc)|(?:all\.fuseurl.com)|(?:alturl\.com)|(?:amzn\.to)|(?:ar\.gy)|(?:arst\.ch)|(?:atu\.ca)|(?:azc\.cc)|(?:b23\.ru)|(?:b2l\.me)|(?:bacn\.me)|(?:bcool\.bz)|(?:binged\.it)|(?:bit\.ly)|(?:bizj\.us)|(?:bloat\.me)|(?:bravo\.ly)|(?:bsa\.ly)|(?:budurl\.com)|(?:canurl\.com)|(?:chilp\.it)|(?:chzb\.gr)|(?:cl\.lk)|(?:cl\.ly)|(?:clck\.ru)|(?:cli\.gs)|(?:cliccami\.info)|(?:clickthru\.ca)|(?:clop\.in)|(?:conta\.cc)|(?:cort\.as)|(?:cot\.ag)|(?:crks\.me)|(?:ctvr\.us)|(?:cutt\.us)|(?:dai\.ly)|(?:decenturl\.com)|(?:dfl8\.me)|(?:digbig\.com)|(?:digg\.com)|(?:disq\.us)|(?:dld\.bz)|(?:dlvr\.it)|(?:do\.my)|(?:doiop\.com)|(?:dopen\.us)|(?:easyuri\.com)|(?:easyurl\.net)|(?:eepurl\.com)|(?:eweri\.com)|(?:fa\.by)|(?:fav\.me)|(?:fb\.me)|(?:fbshare\.me)|(?:ff\.im)|(?:fff\ |
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
var path = require( 'path' ); | |
var fs = require( 'fs' ); | |
module.exports = function( grunt ) { | |
// Initialize Grunt configuration | |
grunt.initConfig({ | |
colourScheme: { // Default configuration for the colourScheme task | |
paths: { // Relative path parts. All paths but 'root' are relative to 'root' | |
root: 'assets/css', // Relative to Grunt's process.cwd() | |
lessCore: 'less', // Directory containing the core LESS file |
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
var forumLabels = { | |
labels: {}, | |
insertionIndex: 0, | |
copy: function() { | |
var labels = this.labels = []; | |
$('div.list.ui-autoform').children().each( function() { | |
var name = $(this).find( 'input.tl-name-input' ).val(); | |
if( '' == name ) |
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
$cacheDir = "$($env:LOCALAPPDATA)\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" | |
$destDir = "$($env:HOME)\Pictures\Spotlight" | |
$lastSync = 0 | |
$sizeThreshold = 184320 | |
function Read-CacheFiles { | |
Get-ChildItem $cacheDir | |
} | |
function Read-CopiedFiles { |
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
class AliceBotCT1 { | |
constructor( httpHeaders ) { | |
this.alicebotMacro = "!alicebot.out_4l1c3b" | |
this.discordClient = new DiscordClient( httpHeaders.authorization, httpHeaders.cookie, httpHeaders.superProperties ) | |
this.lockArgs = null | |
this.latency = { | |
process: { | |
start: null, | |
value: 0 | |
}, |
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
class MNswprUI { | |
constructor( baseArgs = "" ) { | |
this.dOMObserver = new MutationObserver( this.processDOMMutations.bind( this ) ) | |
this.$input = document.getElementsByClassName("channel-textarea-inner")[0] | |
this.$input = this.$input.getElementsByTagName("textarea")[0] | |
this.baseArgs = baseArgs | |
this.dOMObserver.observe( document.getElementsByClassName("messages")[0], { childList: true, subtree: true } ) | |
} | |
parse() { |
OlderNewer