Skip to content

Instantly share code, notes, and snippets.

View carlos-wong's full-sized avatar

carlos carlos-wong

  • Lejurobot.com
  • china, shenzhen
View GitHub Profile
@carlos-wong
carlos-wong / howto.txt
Created April 28, 2013 07:34
android: sunplug android make
carlos@ubuntu:~/workspace/sunplus/openplatform$ make config
==============================================
== Configuration Setup (Ver: 0.24)
==============================================
<< Select Project >>
1. [ Factory test ] - gplus
2. [ Android 2.3.4 Binary Release ] - gplus
3. [ Android 2.3.4 Source Code ] - gplus
4. [ Android 4.0.4 Binary Release ] - gplus
5. [ Android 4.0.4 Source Code ] - gplus
@carlos-wong
carlos-wong / tar.txt
Created April 28, 2013 07:33
tar: show progress when uncompress file
pv file.tgz | tar xzf - -C target_directory
@carlos-wong
carlos-wong / index.html
Created April 28, 2013 06:30
javascript: pass parameter to setTimerout
setTimeout(updateImage, 10000, url);
@carlos-wong
carlos-wong / index.html
Created April 28, 2013 06:29
javascript: run function when page onload
<body onload="function('')">
function updateImage(url)
{
<!-- alert(url); -->
if(newImage.complete) {
document.getElementById("theText").src = newImage.src;
newImage = new Image();
newImage.src = "/media/picture/245.jpg";
httpGet(url);
}
@carlos-wong
carlos-wong / *scratch*.el
Created April 20, 2013 06:54
Emacs: max frame on macos
(maximize-frame)
@carlos-wong
carlos-wong / sensor.c
Created April 20, 2013 06:49
C: #marco print a value with format
#define PRINT_VALUE(a,b) \
printk("%s():%d " #b "is " #a "\n",__func__,__LINE__,b)
@carlos-wong
carlos-wong / python: struct pack char.txt
Created April 20, 2013 06:38
python: struct pack char
struct.pack('c', '\x00')
@carlos-wong
carlos-wong / cscope_wiht_python.txt
Last active November 25, 2016 16:10
bash: cscope work with pyhon
Change to the top directory of your python code. Create a file called cscope.files:
find . -name '*.py' > cscope.files
cscope -R
You may need to perform a cscope -b first if the cross references don't get built properly.
@carlos-wong
carlos-wong / bash: dd progress
Created April 17, 2013 08:03
bash: dd progress and set dd size if need
pv -tpreb /dev/urandom | dd of=file.img
sudo pv /dev/sdc | dd of=~/workspace/snk_5_2.img bs=1M count=1850 iflag=fullblock
@carlos-wong
carlos-wong / git: submodules fetch every modules
Created April 17, 2013 05:59
git: submodules fetch every modules
git submodule foreach git fetch