Skip to content

Instantly share code, notes, and snippets.

####### Compiler, tools and options
SO_EXT = .dylib
AR_EXT = .a
#---- Release
CXXCFG = -O3
LFLAGS =
OUT_DIR = ../lib
#---- Debug
@tmngtk
tmngtk / configure_liblo_iphone.sh
Created March 19, 2012 14:46 — forked from dabio/configure_liblo_iphone.sh
Configure liblo for iOS 5.0
./configure \
--host="arm-apple-darwin" \
--enable-static \
--disable-shared \
--disable-dependency-tracking \
CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
CPP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-cpp-4.2 \
CXXCPP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-cpp-4.2 \
CXX=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc\
AR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar \
<!-- in /files/prefpane/checkbox.xml, add below -->
<item>
<name>tomonaga</name>
<list>
<item>
<name>For UK</name>
<appendix>(` to Shift, \ to Enter, § to \)</appendix>
<sysctl>remap.uk_tomonaga</sysctl>
<autogen>--KeyToKey-- KeyCode::BACKQUOTE, KeyCode::SHIFT_L</autogen>
import pyglet
from pyglet.gl import *
import psyco
import time
FRAME_RATE = 60
USE_FULL_SCREEN = False
window = pyglet.window.Window(fullscreen=USE_FULL_SCREEN)
#
# my_replace("abcdefg", "bc", "ef")
# returns "ag"
#
# my_replace("abcdefg", "bc", "ef", "012")
# returns "a012g"
#
def my_replace(s, start, end, rep = ''):
buf = []
def update(dt):
update.fps_t += dt
if update.fps_t > 1:
print "%s fps" % (get_fps())
update.fps_t = 0
update.fps_t = 0