Skip to content

Instantly share code, notes, and snippets.

View HybridEidolon's full-sized avatar
🐥

Eidolon HybridEidolon

🐥
View GitHub Profile
@HybridEidolon
HybridEidolon / fizzbuzz.hs
Last active August 29, 2015 14:21
fizzbuzz is really not that hard, come on
fizzBuzz :: [[Char]]
fizzBuzz = map (mapFizzBuzz) [1..100]
mapFizzBuzz :: Int -> [Char]
mapFizzBuzz n
| (n `mod` 3 == 0) && (n `mod` 5 == 0) = "FizzBuzz"
| n `mod` 3 == 0 = "Fizz"
| n `mod` 5 == 0 = "Buzz"
| otherwise = show n
#include <functional>
using namespace std;
void renderAllNodesMatching(function<bool(const SceneNode&)> func)
{
if (!func(*this)) return;
render();
// ... call func on all nodes and render them if true
for (SceneNode * n : children)
#include <memory>
using namespace std;
// LITERALLY NEVER DO THIS.
void dontDoThis(void)
{
float * data = new float[1000];
shared_ptr<float> shptrA(data);
#include <vector>
#include <GL/gl.h>
using namespace std;
struct Vector3f
{
float x;
float y;
float z;
@HybridEidolon
HybridEidolon / 01-guide.md
Last active June 3, 2025 13:33
Minecraft modding for competent Java programmers

Minecraft Forge New Mod Guide

Make sure you have Gradle installed and in your path, so you can run it from command line. Otherwise, you should copy a bootstrapper and the gradle jar into your project.

Use this template build.gradle (for the MC 1.8 unstable branch) for your gradle script:

{
"show_output_panel": false,
"dont_prepend_clang_includes": true,
"additional_language_options":
{
"c++" :
[
"-std=gnu++11",
"-isystem", "C:\\cygwin\\usr\\i686-w64-mingw32\\sys-root\\mingw\\include\\c++\\4.8.0",
@HybridEidolon
HybridEidolon / khdown.py
Created August 15, 2014 06:06
KH-Insider Music Album Downloader (Python 3)
#!/usr/bin/env python2
import requests as req
import sys
import lxml.html as html
import lxml.etree as etree
import re
# grab page from args
doc = html.parse('http://downloads.khinsider.com/game-soundtracks/album/' + sys.argv[1])

Cleanup QuasselCore sqlite3 db procedure

These instructions are for an Ubuntu/Debian setup, may be slightly different on other platforms.

sudo su
cd /path/to/quasseldata
service quasselcore stop
sqlite3 db-file.sqlite "delete from backlog where time<`date --date=\"August 1 2014\" +%s`;"
service quasselcore start
@HybridEidolon
HybridEidolon / srb2sdl2-migration.md
Last active August 29, 2015 14:04
SRB2 SDL2 migration status stuff

SRB2 SDL2 Migration Status

aka "things only I really care about"

Task list:

  • Mouse speed mapping (don't use SDL relative mode)
  • Joystick migration
  • OpenGL renderer support migration
  • remove non-standard resolutions from res list but allow any resolution via command line args
@HybridEidolon
HybridEidolon / GameMain.java
Created June 1, 2014 22:24
insane java antics
package com.idolagames.bulletrogue;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.idolagames.bulletrogue.scene.Actor;
import com.idolagames.bulletrogue.scene.Component;
import com.idolagames.bulletrogue.scene.RegisterComponent;
import org.reflections.Reflections;