Skip to content

Instantly share code, notes, and snippets.

View flashwave's full-sized avatar

flash flashwave

View GitHub Profile
<?php
define('SCRATCH_DIR', __DIR__ . DIRECTORY_SEPARATOR . '_scratch2');
define('SRC_MARIE', __DIR__ . DIRECTORY_SEPARATOR . 'marie' . DIRECTORY_SEPARATOR . '.git');
define('SRC_NERU', __DIR__ . DIRECTORY_SEPARATOR . 'srv-neru' . DIRECTORY_SEPARATOR . '.git');
define('TGT_MARIE', 'C:\Users\flash\Desktop\target\db-marie\\.git');
define('TGT_NERU', 'C:\Users\flash\Desktop\target\db-neru\\.git');
$sourceGit = SRC_NERU;
$targetGit = TGT_NERU;
@flashwave
flashwave / struct.sql
Created September 25, 2022 22:57
temperature shittery
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.6.9-MariaDB-1:10.6.9+maria~ubu2004 - mariadb.org binary distribution
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 12.1.0.6537
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
@flashwave
flashwave / gist:1e12c87892257a9a8a6f502af89797d8
Created April 7, 2022 20:28
Flashii/Saibateku AJAX Chat Colours
Silver #C0C0C0
Citrine #F2D839
Orange #FFA500
Pumpkin #FF7518
Red #F50000
Crimson #C00000
Ruby #E0115F
Amaranth #E52B50
Thulite #DE6FA1
Pink #FF6FF2
@flashwave
flashwave / convert-anime.php
Created February 25, 2022 01:43
utilities used to whip ai images into shape for avatars, might need them again someday idk
<?php
printf('[%s] Collecting...%s', date('H:i:s'), PHP_EOL);
$pngs = glob('tadne_png/*.png');
printf('[%s] Starting...%s', date('H:i:s'), PHP_EOL);
foreach($pngs as $png) {
printf('[%s] %s%s', date('H:i:s'), $png, PHP_EOL);
@flashwave
flashwave / Playlist.cs
Created January 18, 2021 19:05
music man
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
namespace MusicManager {
public class Playlist : IDisposable, IEnumerable<string> {
private Stream Stream { get; }
var Marquee = function(element) {
if(element)
this.element = element;
else {
this.element = document.createElement('div');
this.element.className = 'js-marquee';
}
this.body = element.firstElementChild;
if(!this.body) {
orange: #f78f2e
yellow orange: #fedc0c
lime green: #d1f20a
pink: #fe447d
emerald green: #5cd05b
teal: #03c1cd
blue: #0e10e6
violet: #9208e7
red orange: #f84c00
yellow: #f3f354
<?php
define('SHAREX_KEY', '>:(');
define('SHAREX_URL', 'https://mikoto.misaka.nl/i/%s');
define('SHAREX_DIR', __DIR__ . '/i/');
function die_better($text, $code = 418) {
http_response_code($code);
die($text);
}
@flashwave
flashwave / Route.php
Created August 3, 2019 02:33
shitty router which i wrote for a project but then i realised i didn't need to do router bullshit
<?php
namespace Index\Router;
class Route {
public const METHODS = ['GET', 'POST'];
private $methods = [];
private $path = '';
private $handler;
private $pathIsRegex = false;
<?php
$path = $argv[1] ?? '';
if(!is_dir($path))
die("invalid path specified\r\n");
function collect_extensions(string $path): array {
$files = glob(rtrim($path, '/') . '/*');
$out = [];