View kofi-cleaner.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
// ==UserScript== | |
// @name ko-fi cleaner | |
// @namespace Violentmonkey Scripts | |
// @match https://ko-fi.com/*/shop | |
// @grant none | |
// @version 1.0 | |
// @author paulbgd | |
// @description 8/29/2023, 6:18:50 PM | |
// ==/UserScript== |
View PlayerSpreader.java
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
import org.bukkit.GameMode; | |
import org.bukkit.Location; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.player.PlayerJoinEvent; | |
import org.bukkit.plugin.java.JavaPlugin; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.UUID; |
View Model.ts
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
type Listener<T> = () => any; | |
type Canceller = () => void; | |
export interface Depends { | |
[key: string]: Model<any, any>; | |
} | |
abstract class Model<T, D extends Depends> { | |
private _listeners: Listener<T>[]; | |
private _cancel: Canceller[]; // from old code, is this supposed to do something? maybe unload all data from a specific page? |
View hacky-preact-inject.ts
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
/// <reference path="typings/preact.d.ts"/> | |
import {h} from 'preact'; | |
export function createElement<P>(type: any, props?: P, ...children: any[]): any { | |
return h(type, props, children); | |
} | |
View .esconfig.json
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
{ | |
"indent": { | |
"value": " ", | |
"FunctionExpression": 1, | |
"ArrayExpression": 1, | |
"ObjectExpression": 1 | |
}, | |
"plugins": [ | |
"esformatter-jsx" | |
], |
View .vimrc
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'itchyny/lightline.vim' |
View connect-smart-redis.d.ts
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
/// <reference path="../express-session/express-session.d.ts" /> | |
declare module 'connect-smart-redis' { | |
import Session = require('express-session'); | |
module s { | |
interface SmartRedisOptions { | |
ttl: number; | |
client: any; | |
prefix?: string; |
View client-api.tsx
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
/// <reference path="../../typings/tsd.d.ts" /> | |
import {Router, Request, Response} from 'express'; | |
import * as ArtisanValidator from 'artisan-validator'; | |
import {DatabaseClient, DatabaseError} from '../database'; | |
let ClientAPI: Router = Router(); | |
let validator: ArtisanValidator.Validator = ArtisanValidator(); |
View artisan-validator.d.ts
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
/// <reference path="../bluebird/bluebird.d.ts" /> | |
declare module ArtisanValidator { | |
class Validator<R> { | |
try(checking: any, rules: R): Promise<ValidatorResult<R>>; | |
validators: ArtisanValidator.Validators; | |
} | |
interface ValidatorResult<R> { |
View shouldhavebroken.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
updateSelector() { | |
if (this.running) { | |
return this.selector.style.display = 'none'; | |
} | |
let lines = this.lines; | |
let length = this.input.value.length; | |
if (!this.running) { | |
length += this.prefix.length; | |
} | |
length -= this.input.value.length - this.input.selectionStart; |
NewerOlder