Skip to content

Instantly share code, notes, and snippets.

@megadrive
megadrive / animals.json
Created August 31, 2021 01:19 — forked from borlaym/animals.json
Array of animal names
[
"Aardvark",
"Albatross",
"Alligator",
"Alpaca",
"Ant",
"Anteater",
"Antelope",
"Ape",
"Armadillo",
@megadrive
megadrive / easing.js
Created July 16, 2019 12:14 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@megadrive
megadrive / reactioncollector.js
Last active April 12, 2022 07:37
Discord.JS ReactionCollector example
const Discord = require('discord.js')
const { ReactionCollector } = require('discord.js')
const token = ''
const discord = Discord.Client()
discord.login(token)
const emojiToTrack = '⭐'
@megadrive
megadrive / hello.js
Created August 13, 2018 11:45
Twstinf
const is = h
@megadrive
megadrive / howlong.php
Created November 7, 2016 13:16
Gets a number between 1 and 12 based on the md5 hash of a username. You can use ?user={username} or use nightbot with it.
<?php
$headers = getallheaders();
$username = "";
if($headers["Nightbot-User"] !== null)
{
$username = $headers["Nightbot-User"];
}
-- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: ozbt
-- ------------------------------------------------------
-- Server version 5.5.49-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@megadrive
megadrive / GAME_MASTER_v0_1.json
Created July 17, 2016 06:06 — forked from rmkane/GAME_MASTER_v0_1.json
Pokemon GO Game Data
{
"Items": [ {
"TemplateId": "BADGE_BATTLE_ATTACK_WON",
"Badge": {
"BadgeType": "BADGE_BATTLE_ATTACK_WON",
"BadgeRanks": 4,
"Targets": "\\nd\\350\\007"
}
}, {
"TemplateId": "BADGE_BATTLE_TRAINING_WON",
@megadrive
megadrive / track_modding.js
Created May 23, 2016 23:36
Bot to track timeouts and bans
require tmijs
client = new tmijs
client.on(timeout, (channel, user) => {
db.insert(channel, user, date)
})
"use strict";
var _config = require("../config/config.user.js");
var _client = undefined;
var _dbHelpers = require("../mysqlHelpers.js");
var fs = require("fs");
var fork = require("child_process").fork;
var consts = require("../consts.js");
var util = require("../util.js");
This file has been truncated, but you can view the full file.
Connecting to irc-ws.chat.twitch.tv on port 80..
Sending authentication to server..
Connected to server.
Connected to MySQL.
Executing command: JOIN #megadriving
Executing command: JOIN #tirean
Joined #megadriving
Joined #tirean
[#tirean] <megadriving>: kk, should be ok
[#tirean] <borg808>: Die so I can go to sleep