Skip to content

Instantly share code, notes, and snippets.

View hansihe's full-sized avatar

Hans Elias J. hansihe

View GitHub Profile
System.IndexOutOfRangeException: Array index is out of range.
at Microsoft.Xna.Framework.Content.LzxDecoder.Decompress (System.IO.Stream,int,System.IO.Stream,int) [0x008e9] in c:\Users\HansiHE\MonoGame3D\MonoGame.Framework\Content\LzxDecoder.cs:442
at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset<Microsoft.Xna.Framework.Graphics.Texture2D> (string,System.Action`1<System.IDisposable>) <0x02bd7>
at Microsoft.Xna.Framework.Content.ContentManager.Load<Microsoft.Xna.Framework.Graphics.Texture2D> (string) <0x00497>
at ProjectAndroid.Main.LoadContent () [0x00bbd] in c:\Users\HansiHE\ProjectAndroid\Main.cs:3237
at Microsoft.Xna.Framework.Game.Initialize () [0x0008a] in c:\Users\HansiHE\MonoGame3D\MonoGame.Framework\Game.cs:517
@hansihe
hansihe / gist:3655863
Created September 6, 2012 12:43
Lolspam
From Miss Donathan Hans
Abuja, Nigeria
Dear,
My name is Miss Donathan Hans,I am 20 years old girl from Nigeria in West
Africa. I want to have a common relationship with you, I need to tell you more
things, but first I need your help to Stand for me as a trustee.
My father late Chief Nicholas Hans was a businessman before his death on
@hansihe
hansihe / Parsed response on failiure
Created January 19, 2013 14:10
As you can see, there is something really different in url_encoded_fmt_stream_map, where the urls and sigs are extracted from.
{u'abd': [u'1'],
u'ad3_module': [u'http://s.ytimg.com/yts/swfbin/ad3-vflY7wT_P.swf'],
u'ad_channel_code_instream': [u'afv_instream,Vertical_3,Vertical_35,Vertical_588,Vertical_590,afv_user_ldukmusic,afv_user_id_vCJp9BRmLq0KDOcwfGAKEw,yt_mpvid_AATTpHyXBuqc12jM,yt_cid_620646,ivpypp,ytexp_927903.913565.916614.920704.912806.922403.922405.929901.913605.925710.929104.929110.908493.920201.913302.919009.911116.910221.901451,ytdevice_1,ytps_default,ytel_detailpage'],
u'ad_channel_code_overlay': [u'invideo_overlay_480x70_cat10,afv_overlay,Vertical_3,Vertical_35,Vertical_588,Vertical_590,afv_user_ldukmusic,afv_user_id_vCJp9BRmLq0KDOcwfGAKEw,yt_mpvid_AATTpHyXBuqc12jM,yt_cid_620646,ivpypp,ytexp_927903.913565.916614.920704.912806.922403.922405.929901.913605.925710.929104.929110.908493.920201.913302.919009.911116.910221.901451,ytdevice_1,ytps_default,ytel_detailpage'],
u'ad_device': [u'1'],
u'ad_eurl': [u'http://www.youtube.com/video/GECb2ZlG7UM'],
u'ad_flags': [u'0'],
u'ad_host': [u'ca-host-pub-2220266046269459'],
__author__ = 'HansiHE' #Pls dont kill meh D: (This is a joke, for gods sake don't take this seriously)
import sys
import copy
import re
target = "Hello World"
def get_char(n):
global temptarget
Forum features
[done] post create/edit/delete
[done] subforums
forum captions, e.g. for staff forum "so damn secret it doesn't even make sense!"
quoting
edit history
topic subscriptions
mod powers
>PN,950HB?B<.GFF-%B C::2D?*!
@hansihe
hansihe / gist:737c83d68c3fb632759c
Last active August 29, 2015 14:00
Minecraft portal finding algorithm
private final LongHashMap<Long, ChunkCoordinatesPortal> portalCache = new LongHashMap(); // ChunkCoord -> PortalCoord Originally named 'c', used for caching.
private final List<Long> portalChunks = new ArrayList(); // Originally named 'd', list of portal chunk coordinates (??)
public ChunkCoordinates findPortal(double xPos, double yPos, double zPos, int searchRadius) {
//Inserted
final int worldHeight = this.a.S()
// If world env is END, use spesific algorithm for that
if (this.a.getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END) { // this.a instanceof WorldServer
;koku-xinput-wine config, for more information see https://github.com/KoKuToru/koku-xinput-wine
XINPUT_GAMEPAD_LEFT_THUMB_X = A01
XINPUT_GAMEPAD_LEFT_THUMB_Y = A02*-1
XINPUT_GAMEPAD_RIGHT_THUMB_X = A04
XINPUT_GAMEPAD_RIGHT_THUMB_Y = A05*-1
XINPUT_GAMEPAD_DPAD_UP = H01&0x0001
XINPUT_GAMEPAD_DPAD_DOWN = H01&0x0004
XINPUT_GAMEPAD_DPAD_LEFT = H01&0x0008
XINPUT_GAMEPAD_DPAD_RIGHT = H01&0x0002
XINPUT_GAMEPAD_START = B08
@hansihe
hansihe / rl-api.md
Last active October 19, 2022 21:54
Rocket League API Documentation

#Rocket League API

Endpoints

All requests seem to be to the domain https://psyonix-rl.appspot.com. There are several endpoints on this domain.

Endpoint Purpose
/callproc105/ Leaderboard, player statistics
/Population/GetPopulation/ Player counts/regions
/login105/ Authentication, obtaining session ids
@hansihe
hansihe / playground.rs
Created January 7, 2016 07:29 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::marker::PhantomData;
struct Env;
#[derive(Clone, Copy)]
struct Term<'a> {
life: PhantomData<&'a Env>,
}
// Decodes a Term to a rust value. This interfaces with native code.
trait Decoder: Sized {