Skip to content

Instantly share code, notes, and snippets.

@cigumo
cigumo / gist:1562382
Created January 4, 2012 21:54
git prompt for bash
# git branch in prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function git_prompt {
PS1="\r\n[\u@\h:\e[1m\w\e[0m] $(parse_git_branch)\r\n\\$ "
}
@cigumo
cigumo / gist:2131243
Created March 20, 2012 04:11
GDC 2012 - Interesting sessions

dear Esther ++++

[2012-03-08 jue 17:54] watch again!!

  • "trust that goes with level of finish"
  • music to control the emotional journey of the player.
  • experience vacuum
  • lack of stimulation is not lack of experience
  • overstimulation kills atmosphere
  • engage emotionally vs engage intellectually
@cigumo
cigumo / texture_atlas.py
Created September 7, 2012 18:56
Texture atlas generator - kalio.net
'''
Texture atlas generator / Kalio.net
klibs commit: 709551bcf617976a19e6105165eda9524007fc08
Copyright 2012 Kalio Ltda.
Requirements:
- PIL: http://www.pythonware.com/products/pil/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@cigumo
cigumo / gist:5007370
Created February 21, 2013 19:26
Blender render automation for Ring Run Circus characters
characters = { 'lion', 'man', 'motoman', 'strongman', 'tiger', 'magician', ...
q = 7 # number of camera angles from side to top
edge_threshold = 3 # outline edge threshold
render_path = '//out/'
# main loop
cs = bpy.data.scenes['characters']
for c in characters:
# render multi angle scenes:
for name in [ ('_action', '.action'), ('_side-l', '.side') ]:
Engine = class('Engine')
function Engine:initialize()
-- ...
self:register_signals()
end
Changes:
Modified src/kgl/lua/kgl_nodes_classes.lua
diff --git a/src/kgl/lua/kgl_nodes_classes.lua b/src/kgl/lua/kgl_nodes_classes.lua
index d11e296..b708d57 100644
--- a/src/kgl/lua/kgl_nodes_classes.lua
+++ b/src/kgl/lua/kgl_nodes_classes.lua
@@ -99,7 +99,7 @@ end
-- It assumes the node's userdata writeBack function expects to receive the userdata and the node as
-- parameters.
function Node:writeBack()
// event handlers
var click_handlers = {
'new_note_submit' : create_note,
'note_read_confirm_submit' : read_note
}
for (element_name in click_handlers) {
function mfh(element,handler) {
return function(event) {
event.stop();
handler();
@cigumo
cigumo / gist:3cc4196f3e4f0ed3edb0
Last active January 20, 2016 15:11
Love2d 0.10 android 4.2.2 on Samsung Galaxy S4 Crash
D/CrashAnrDetector( 776): Build: samsung/jfltecsp/jfltecsp:4.2.2/JDQ39/R970XWWUAMG1:user/release-keys
D/CrashAnrDetector( 776): Hardware: MSM8960
D/CrashAnrDetector( 776): Revision: 11
D/CrashAnrDetector( 776): Bootloader: R970XWWUAMG1
D/CrashAnrDetector( 776): Radio: unknown
D/CrashAnrDetector( 776): Kernel: Linux version 3.4.0-939344 (se.infra@S0210-19) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Sat Jul 13 14:36:56 KST 2013
D/CrashAnrDetector( 776):
D/CrashAnrDetector( 776): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
D/CrashAnrDetector( 776): Build fingerprint: 'samsung/jfltecsp/jfltecsp:4.2.2/JDQ39/R970XWWUAMG1:user/release-keys'
D/CrashAnrDetector( 776): Revision: '11'
# Changelog - Kingdom Rush Frontiers | PC/Mac/Linux
## 1.4.2
- Dwarves say regular barracks taunts when the level starts (fixes #903)
- Saurian Deathcoils don't lock on to dwarves (fixes #903)
- Chinese and Korean font adjustments
- click area on continue button of victory screen (fixes #904)
- CJK testing credits
- Translation suggestions from Aix (JA), Soohyeon Wi (KR) and Junesung Oh (KR). Thanks!
- Korean font replacement
- typography credits (closes #906)
@cigumo
cigumo / gist:316ef0e4d149b26d7a34ac0a0cf3eca3
Created September 16, 2017 22:55
Spelunky Classic - ASCII tiles table
"!" oShopkeeperTile
"#" oGoldIdolTile
"$" oGoldBarTile
"%" oSpectaclesTile
"&" oWebTile
"(" oMattockTile
")" oLeavesTile
"*" oGoldBarsTile
"+" oSmashTrapTile
"-" oPistolTile