Skip to content

Instantly share code, notes, and snippets.

View judeibe's full-sized avatar

Toochukwu Ibe judeibe

  • Pariveda Solutions
  • Chicago
  • 02:54 (UTC -05:00)
View GitHub Profile
{
"name": {country},
"capital": {string|8},
"size": {numberLength|8}
}
@judeibe
judeibe / .bash_profile
Created November 6, 2017 04:41
Color terminal for Mac using bash-complete
# Enable colors for the bash -ls command
export CLICOLOR=1
export LSCOLORS="ExfxcxdxExegDxabagacDx"
# Configure terminal formatting colors & styles
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue

##INSTUCTIONS Retrive and install 'storaAIO.sh"

-bash-3.2$ wget --no-check-certificate https://github.com/darkfire/Stora-AIO/raw/master/storaAIO.sh
-bash-3.2$ chmod +x ./storaAIO.sh
-bash-3.2$ sudo ./storaAIO.sh

Run selected tasks

if ("property".equals(qName) | "property".equals(name)) {
String parentType = currentBranch.get(currentBranch.size() - 3);
putProperty(parentType, attr.getValue("name"), attr.getValue("value"));
return;
}
// Loop through all tiles on map
for (TiledLayer layer : map.layers) {
for (int row = 0; row < layer.height; row++) {
for (int col = 0; col < layer.width; col++) {
if (layer.tile[row][col] != 0) {
tileCount++;
if (!tilesOnMap.contains(layer.tile[row][col])) {
tilesOnMap.add(layer.tile[row][col]);
}
}
if ("objectgroup".equals(qName) | "objectgroup".equals(name)) {
currentObjectGroup = new TiledObjectGroup();
currentObjectGroup.name = attr.getValue("name");
currentObjectGroup.height = Integer.parseInt(attr.getValue("height"));
currentObjectGroup.width = Integer.parseInt(attr.getValue("width"));
return;
}
if ("object".equals(qName) | "object".equals(name)) {
currentObject = new TiledObject();
@judeibe
judeibe / gist:871157
Created March 15, 2011 18:05
Client Trust
This is a classic problem with Internet games and contests. Your Flash code works with users to decide a score for a game. But users aren't trusted, and the Flash code runs on the user's computer. You're SOL. There is nothing you can do to prevent an attacker from forging high scores:
Flash is even easier to reverse engineer than you might think it is, since the bytecodes are well documented and describe a high-level language (Actionscript) --- when you publish a Flash game, you're publishing your source code, whether you know it or not.
Attackers control the runtime memory of the Flash interpreter, so that anyone who knows how to use a programmable debugger can alter any variable (including the current score) at any time, or alter the program itself.
The simplest possible attack against your system is to run the HTTP traffic for the game through a proxy, catch the high-score save, and replay it with a higher score.
You can try to block this attack by binding each high score save to a single insta
Exception in thread "Thread-3" javax.media.opengl.GLException: java.lang.UnsatisfiedLinkError: com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT0(Ljava/nio/ByteBuffer;)Z
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
at com.badlogic.gdx.backends.jogl.JoglAnimator.display(JoglAnimator.java:149)
at com.badlogic.gdx.backends.jogl.JoglAnimator$MainLoop.run(JoglAnimator.java:186)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT0(Ljava/nio/ByteBuffer;)Z
at com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT0(Native Method)
at com.sun.opengl.impl.JAWTFactory.JAWT_GetAWT(JAWTFactory.java:38)
@judeibe
judeibe / gist:870000
Created March 14, 2011 22:23
tiledmappacker.java exception
Exception in thread "main" com.badlogic.gdx.utils.GdxRuntimeException: Creating window failed
at com.badlogic.gdx.backends.jogl.JoglApplication.<init>(JoglApplication.java:77)
at com.badlogic.gdx.tiledmappacker.TiledMapPacker.main(TiledMapPacker.java:287)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.badlogic.gdx.backends.jogl.JoglApplication.<init>(JoglApplication.java:71)
... 1 more
Caused by: java.lang.UnsatisfiedLinkError: no gdx-64 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
if (reason.Length < 2 || reason[0] == "VER")
0
System.Windows.Forms.MessageBox.Show("Error: client/server version incompability!\r\nServer: " + msgBuffer.ReadString() + "\r\nClient: " + Defines.INFINIMINER_VERSION);
0
else
0
- System.Windows.Forms.MessageBox.Show("Error: you are banned from this server!");
0
+ System.Windows.Forms.MessageBox.Show(reason[0]);