Skip to content

Instantly share code, notes, and snippets.

@stubb
stubb / oglft_patch.diff
Last active Feb 29, 2016
Patch for oglft to include freetype path and allow shared building.
View oglft_patch.diff
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (Revision 112)
+++ CMakeLists.txt (Arbeitskopie)
@@ -1,10 +1,13 @@
# $Id$
project( OGLFT )
-set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config )
+#set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config )
View p.py
def get_unit_tooltip(self, unit_id):
"""Tries to identify unit properties to display as tooltip.
#TODO Should be extended later to also include movement speed, etc."""
helptexts = [] # collects all information we will find
unit = Entities.units[unit_id]
try:
comp = unit.get_component_template('StorageComponent')
print 'a'
print type(comp)
print 'b'
View gist:69241ac744dd19542577
#include <stdio.h>
#include <stdint.h>
#define BYTETOBINARYPATTERN "%d%d%d%d%d%d%d%d"
#define BYTETOBINARY(byte) \
(byte & 0x80 ? 1 : 0), \
(byte & 0x40 ? 1 : 0), \
(byte & 0x20 ? 1 : 0), \
(byte & 0x10 ? 1 : 0), \
(byte & 0x08 ? 1 : 0), \
View gist:fc029959afbcd4e4f482
# Maintainer: Sergio Correia <sergio@correia.cc>
pkgname=libwebrtc-static
_pkgname=libwebrtc
pkgver=7746
pkgrel=1
pkgdesc="A library that enables web browsers with Real-Time Communications (RTC) capabilities via simple Javascript APIs"
arch=('x86_64')
url="http://www.webrtc.org/"
license=('custom')
View gist:74b766e0662ef07ce700
# wait a second to give the thread time to check if a generation is necessary at all
time.sleep(1.0)
window.deiconify()
while atlas_loading_thread.is_alive():
if not window.state() == "iconic":
window.attributes("-topmost", 0)
window.update()
time.sleep(0.1)
window.destroy()
except ImportError:
View gist:8b87e038914399df26c4
[GAMESTART]
Initing autosave every 10 minutes
Unknown packet from 176.28.15.248:2002!
Unknown packet from 176.28.15.248:2002!
[FATAL] Pickle/Security: Attempting to unpickle unsafe class "GenericUnitCommand" (module="horizons.command.unit")
[FATAL] Pickle/Security: Attempting to unpickle unsafe class "GenericUnitCommand" (module="horizons.command.unit")
[FATAL] Pickle/Security: Attempting to unpickle unsafe class "GenericUnitCommand" (module="horizons.command.unit")
[RESET]
[DISCONNECT] done
View gist:c0c19ff650e4bdd78b50
[GAMESTART]
Initing autosave every 10 minutes
Unknown packet from 176.28.15.248:2002!
Unknown packet from 176.28.15.248:2002!
[FATAL] Pickle/Security: Attempting to unpickle unsafe class "GenericUnitCommand" (module="horizons.command.unit")
[FATAL] Pickle/Security: Attempting to unpickle unsafe class "GenericUnitCommand" (module="horizons.command.unit")
[FATAL] Pickle/Security: Attempting to unpickle unsafe class "GenericUnitCommand" (module="horizons.command.unit")
[RESET]
[DISCONNECT] done
View gist:97894fcc45192135b2c8
Traceback (most recent call last):
File "run_uh.py", line 380, in <module>
main()
File "run_uh.py", line 189, in main
ret = horizons.main.start(options)
File "/home/kili/Repositories/unknown-horizons/horizons/main.py", line 268, in start
horizons.globals.fife.run()
File "/home/kili/Repositories/unknown-horizons/horizons/engine/engine.py", line 276, in run
self.loop()
File "/home/kili/Repositories/unknown-horizons/horizons/engine/engine.py", line 288, in loop
View gist:b46e6edb5e88aeef89db
[FATAL] Network message: Ein Spieler hat das Spiel verlassen und das Spiel kann aus technischen Gründen daher momentan nicht fortgesetzt werden.
Traceback (most recent call last):
File "run_uh.py", line 380, in <module>
main()
File "run_uh.py", line 189, in main
ret = horizons.main.start(options)
File "/home/kili/Repositories/unknown-horizons/horizons/main.py", line 268, in start
horizons.globals.fife.run()
File "/home/kili/Repositories/unknown-horizons/horizons/engine/engine.py", line 276, in run
self.loop()
View gist:0467faedb4a94466a3c5
Traceback (most recent call last):
File "run_uh.py", line 380, in <module>
main()
File "run_uh.py", line 189, in main
ret = horizons.main.start(options)
File "/home/kili/Repositories/unknown-horizons/horizons/main.py", line 268, in start
horizons.globals.fife.run()
File "/home/kili/Repositories/unknown-horizons/horizons/engine/engine.py", line 276, in run
self.loop()
File "/home/kili/Repositories/unknown-horizons/horizons/engine/engine.py", line 288, in loop