Skip to content

Instantly share code, notes, and snippets.

Avatar
🛁
If you hard. Then you hard.

Gargaj

🛁
If you hard. Then you hard.
View GitHub Profile
View FusionCompParser.cs
/*
Uses https://github.com/datalust/superpower
Usage:
var text = System.IO.File.ReadAllText("visuals.comp");
var parsed = FusionCompParser.ParseComp(text);
var tools = parsed.Get<FusionCompParser.FusionArray>("Tools");
*/
using Superpower;
View revision2020_threewayshowdown_gargaj.glsl
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texChecker;
uniform sampler2D texNoise;
@Gargaj
Gargaj / pm2-downloader.php
Last active Aug 31, 2015
Automatic downloading and sorting script for Partymeister 2 download pages
View pm2-downloader.php
<?php
include_once("simple_html_dom.php"); // http://simplehtmldom.sourceforge.net
set_time_limit(0);
$rootURL = "http://chaosconstructions.ru/";
$mainURL = $rootURL . "en/results";
$html = file_get_html($mainURL);
@Gargaj
Gargaj / ImageUpload.js
Last active Aug 29, 2015
Multiple image upload with drag-and-drop
View ImageUpload.js
/*
Requires Prototype
Usage:
var upload = new ImageUpload({
dropElement: $('image-container'),
onFinished: function(){ alert("YAY") }, // optional
uploaderURL: "./upload.php", // optional; if not specified, location.href.
});
upload.startUpload({ someParam: 12345 });
@Gargaj
Gargaj / rage-unpacker.php
Created Jun 3, 2015
Data extractor for the Rage demos "Reanim8r" and "Robotnik"
View rage-unpacker.php
<?php
function unpackR8($data)
{
$ret = "";
for ($x = 0; $x < strlen($data);)
{
$control = ord($data{$x++});
for ($bit = 0; $bit < 8; $bit++)
{
if (!($control & (1 << $bit)))
@Gargaj
Gargaj / roman-numerals.php
Last active Aug 29, 2015
Is this the shortest way to convert to roman numerals? I think so.
View roman-numerals.php
<?php
// i woke up this morning with the
// odd thought that i want to
// find out what's the most optimal
// way to spell out an integer as
// roman numerals is.
function romanChar(&$num,$value,$code)
{
$r = "";
while($num >= $value)
@Gargaj
Gargaj / wuhu-install.sh
Last active Apr 27, 2020
Install script for Wuhu (tested on Debian)
View wuhu-install.sh
#!/bin/bash
# install script for http://wuhu.function.hu/
if [ "$EUID" -ne 0 ]
then
echo "[wuhu] ERROR: This script needs to install a bunch of things, so please run as root"
exit
fi
echo "[wuhu] Installing packages..."
View cuemaker.js
function Cue(albumArtist, title, tracks) {
this.PERFORMER = albumArtist;
this.TITLE = title;
this.TRACKS = tracks;
};
function Track(trackNumber, artist, title, offset) {
this.TRACK = trackNumber + ' AUDIO';
this.TITLE = title;
@Gargaj
Gargaj / cssb64ifier.php
Last active Aug 29, 2015
Script to convert small images into inline base64 in CSS
View cssb64ifier.php
<?
$inputFile = "";
$outputFile = "";
$sizeLimit = 10 * 1024;
for ($x = 1; $x<count($argv); $x++) {
switch ($argv[$x]) {
case "--output":
case "-o":
{
$outputFile = $argv[++$x];
@Gargaj
Gargaj / FixChests.cs
Last active Aug 29, 2015
MC 1.8 chest fix
View FixChests.cs
using System;
using Substrate;
using Substrate.Core;
class Program
{
static void Main (string[] args)
{
if (args.Length < 1)
{
You can’t perform that action at this time.