Skip to content

Instantly share code, notes, and snippets.

@Endle
Endle / fix_compile.diff
Created November 28, 2014 13:15
Gist by paste.py @ 2014-11-28 21:15:07.331278
# HG changeset patch
# User Zhenbo Li <litimetal@gmail.com>
# Date 1417180030 -28800
# Fri Nov 28 21:07:10 2014 +0800
# Node ID 5f666868ea28750684c65017761011a05f993d45
# Parent 1162e4a4d7a2ba784392f7812b4aeb1e23a1d5ba
Fix: variable ‘fifoCallbacksRegistered’ set but not used
diff -r 1162e4a4d7a2 -r 5f666868ea28 xpcom/base/nsMemoryInfoDumper.cpp
--- a/xpcom/base/nsMemoryInfoDumper.cpp Thu Nov 27 22:30:17 2014 -0800
@Endle
Endle / com.codeweavers.c4.10744.11281.log
Created November 23, 2014 06:06
Gist by paste.py @ 2014-11-23 14:06:53.259289
***** Sun Nov 23 14:06:05 2014
Starting: '/home/lizhenbo/cxoffice/bin/cxbottle' '--bottle' 'Flash_Player_for_Internet_Explorer_(ActiveX)-2' '--create' '--template' 'winxp' '--install' '--param' 'EnvironmentVariables:CX_BOTTLE_CREATOR_APPID=com.codeweavers.c4.10744'
CXConfig->read(/home/lizhenbo/cxoffice/etc/cxoffice.conf)
CXConfig->read(/home/lizhenbo/.cxoffice/cxoffice.conf)
11806: Grabbing the '/tmp/.wine-1000/bottle-805-de0b05.lock' lock
11806: Got the '/tmp/.wine-1000/bottle-805-de0b05.lock' lock
Running '/home/lizhenbo/cxoffice/share/crossover/bottle_templates/winxp/setup' '--create'
@Endle
Endle / com.codeweavers.c4.10744.5758.log
Created November 23, 2014 05:35
Gist by paste.py @ 2014-11-23 13:35:47.591803
***** Sun Nov 23 13:24:37 2014
Starting: '/home/lizhenbo/cxoffice/bin/cxbottle' '--bottle' 'Flash_Player_for_Internet_Explorer_(ActiveX)' '--create' '--template' 'winxp' '--install' '--param' 'EnvironmentVariables:CX_BOTTLE_CREATOR_APPID=com.codeweavers.c4.10744'
CXConfig->read(/home/lizhenbo/cxoffice/etc/cxoffice.conf)
CXConfig->read(/home/lizhenbo/.cxoffice/cxoffice.conf)
7030: Grabbing the '/tmp/.wine-1000/bottle-805-f8000f.lock' lock
7030: Got the '/tmp/.wine-1000/bottle-805-f8000f.lock' lock
Running '/home/lizhenbo/cxoffice/share/crossover/bottle_templates/winxp/setup' '--create'
@Endle
Endle / make_log
Created November 7, 2014 11:07
Gist by paste.py @ 2014-11-07 19:06:59.784755
make_package: Building xulrunner...
mozconfig is unchanged
make -f /home/lizhenbo/src/gecko/client.mk realbuild CREATE_MOZCONFIG_JSON=
Adding client.mk options from /home/lizhenbo/src/wine_gecko-2.34-beta2-x86/mozconfig:
CONFIG_GUESS=i686-w64-mingw32
AUTOCLOBBER=1
MOZ_OBJDIR=/home/lizhenbo/src/wine_gecko-2.34-beta2-x86
OBJDIR=/home/lizhenbo/src/wine_gecko-2.34-beta2-x86
FOUND_MOZCONFIG=/home/lizhenbo/src/wine_gecko-2.34-beta2-x86/mozconfig
make[1]: Entering directory `/home/lizhenbo/src/gecko'
@Endle
Endle / log
Created November 5, 2014 14:52
Gist by paste.py @ 2014-11-05 22:52:47.437824
make_package: Building xulrunner...
mozconfig is unchanged
make -f /home/lizhenbo/src/gecko/client.mk realbuild CREATE_MOZCONFIG_JSON=
Adding client.mk options from /home/lizhenbo/src/wine_gecko-2.35-devel-x86/mozconfig:
CONFIG_GUESS=i686-w64-mingw32
MOZ_OBJDIR=/home/lizhenbo/src/wine_gecko-2.35-devel-x86
OBJDIR=/home/lizhenbo/src/wine_gecko-2.35-devel-x86
FOUND_MOZCONFIG=/home/lizhenbo/src/wine_gecko-2.35-devel-x86/mozconfig
make[1]: Entering directory `/home/lizhenbo/src/gecko'
make -j8 -C /home/lizhenbo/src/wine_gecko-2.35-devel-x86
@Endle
Endle / sample.s
Created August 22, 2014 04:11
Code sample for HrbLUG
.file "sample.c"
.def ___main; .scl 2; .type 32; .endef
.section .rdata,"dr"
LC0:
.ascii "C:\\sample.txt\0"
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
leal 4(%esp), %ecx
@Endle
Endle / gist:5e5ca62b0f586e1f49e8
Created August 22, 2014 03:54
slidedown error
/home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:37:in `exec': No such file or directory - /usr/local/bin/pygmentize (Errno::ENOENT)
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:37:in `block in popen4'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:85:in `call'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:85:in `block in do_popen'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:62:in `fork'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:62:in `do_popen'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/open4-1.3.4/lib/open4.rb:34:in `popen4'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/vendor/albino.rb:63:in `execute'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/vendor/albino.rb:70:in `colorize'
from /home/lizhenbo/.rvm/gems/ruby-2.0.0-p353/gems/makers-mark-0.1.1/lib/makers-mark/genera
@Endle
Endle / bfs.py
Last active August 29, 2015 14:05
函数式广搜
def expand_dict(record, new_nodes, dist):
'''record is a dict showes previous distance
now_nodes is a set for the nodes we found
dist is a number, showes the distance for new_nodes
return a dict(record1)
'''
new_dict = {i:dist for i in new_nodes}
#more beautiful assert needed
assert(set(new_dict.keys()).intersection(set(record.keys())) == set())
new_record = {a:b for a,b in list(new_dict.items()) + list(record.items())}
@Endle
Endle / gist:d5180e69bbcc1cfebc02
Created August 7, 2014 00:34
Talk in IRC about code style
<endle> 你为什么不用 int 呢?
<StarBrilliant> 不是表示运算用的整数不要用int
<StarBrilliant> 只有用来运算的时候才用int
<StarBrilliant> 比如,如果是表示内存中一个东西的大小
<StarBrilliant> 用 size_t
<StarBrilliant> 如果是表示时间的秒数用 clock_t
<StarBrilliant> 表示字符用 wchar_t
<StarBrilliant> 这些都是等价的整数
<StarBrilliant> 但是不是 int
<endle> 哦,明白你的意思了
@Endle
Endle / log4
Created July 26, 2014 05:47
Gist by paste.py @ 2014-07-26 13:47:20.388872
0009:trace:mshtml:HTMLDOMNode_Release (0x1f0b18) ref=1
0009:trace:mshtml:HTMLDOMNode_AddRef (0x120f9a18) ref=3
0009:trace:mshtml:HTMLDOMNode_AddRef (0x120f9a18) ref=4
0009:trace:mshtml:HTMLDOMNode_Release (0x120f9a18) ref=3
0009:trace:mshtml:HTMLAnchorElement_handle_event CLICK
0009:trace:mshtml:get_target_window L""
0009:trace:mshtml:HTMLWindow2_AddRef (0x1eed70) ref=3
0009:trace:mshtml:nsURI_AddRef (0x1f1838) ref=5
0009:Call msvcrt.memcmp(10448388,6b28876c,00000021) ret=6b06a143
0009:Ret msvcrt.memcmp() retval=00000000 ret=6b06a143