Skip to content

Instantly share code, notes, and snippets.

👞
HOOH WHEE

Gargaj

👞
HOOH WHEE
Block or report user

Report or block Gargaj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 Dec 1, 2018
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)
{
@Gargaj
Gargaj / VolumeTextureConverter.cpp
Last active Aug 29, 2015
2D-to-volume texture converter
View VolumeTextureConverter.cpp
#include <Windows.h>
#include <stdio.h>
#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
#define RESWIDTH 320
#define RESHEIGHT 480
@Gargaj
Gargaj / LUTGenerator.pde
Last active Aug 29, 2015
Color grading LUT generator
View LUTGenerator.pde
int block = 32;
void setup() {
size( block * block, block );
}
void draw() {
loadPixels();
int scale = 256 / block;
for (int r=0; r<block; r++)
for (int g=0; g<block; g++)
You can’t perform that action at this time.