Skip to content

Instantly share code, notes, and snippets.

View flashwave's full-sized avatar

flash flashwave

View GitHub Profile
<?php
function func(int $a, int $b): string {
return (string)($a + $b);
}
$f = function(string $name, ...$args) {
return $name(...$args);
};
echo <<<MEWOW
@flashwave
flashwave / _utils.php
Created April 22, 2019 00:04
old update server scripts (i think check.php and check2.php have been modified so they always return update available)
<?php
function WriteLine($txt = "")
{
echo "{$txt}\n";
}
function WriteParam($name, $value)
{
WriteLine("{$name}:\t{$value}");
}
@flashwave
flashwave / forum-leaderboard.php
Created March 31, 2019 16:55
(Old) Forum Leaderboard
<?php
chdir(__DIR__ . '/../../flashii.net/');
require_once 'misuzu.php';
define('FL_START_YEAR', 2018);
define('FL_START_MONTH', 12);
define('FL_TOTAL', '
SELECT
@flashwave
flashwave / parse.php
Created March 11, 2019 21:47
SockTP reconstructor
<?php
$lines = explode("\n", file_get_contents('out.txt'));
$user = '1';
$contexts = [];
class STPCTX {
public $blocks = [];
public $fileName = '';
public $streamHash = '';
public $sender = 0;
@flashwave
flashwave / README.md
Created March 11, 2019 16:17
script i made in 2014 that downloaded random catgirl images but is broken now because the references domain is dead

Catgirl Downloader

This is a thing I wrote out of complete boredom, basically it's a PHP CLI application (in other words you run this in a terminal/command prompt window) and it downloads catgirls to a folder called catgirls in the same folder as the script!

Good use of PHP, right?

@flashwave
flashwave / sakura-changelog.php
Created March 3, 2019 17:34
sakura changelog export script
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
try {
$database = new PDO('mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=flash_sakura_changelog', '', '');
} catch (Exception $ex) {
die($ex->getMessage());
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>pulse</title>
<style>
@keyframes glow-pulse {
0% { opacity: 0.5; }
60% { opacity: 1.0; }
100% { opacity: 0.5; }
<?php
/*
* (21:42:47) malloc_CDLVII: i think that's one of the two rules of Flash Wave Development
* (21:42:57) malloc_CDLVII: 1. if it is written, it will be rewritten
* (21:43:04) malloc_CDLVII: 2. it will have automatic updates
*/
header('Content-Type: text/plain; charset=utf-8');
define('ACL_NONE', 0x00);
public static class CRC32
{
private const uint POLYNOMIAL = 0xEDB88320;
private const uint INITIAL = 0xFFFFFFFF;
#if GENERATE_LOOKUP
private static uint[] LookupTable = new uint[256];
static CRC32()
{
@flashwave
flashwave / keybase.md
Created November 7, 2017 02:47
Keybase proof

Keybase proof

I hereby claim:

  • I am flashwave on github.
  • I am flashwave (https://keybase.io/flashwave) on keybase.
  • I have a public key ASBwCQQL0nY-unMWq2Y0h-h_I8_WpLejj5LqGWsw0FzsaQo

To claim this, I am signing this object: