Skip to content

Instantly share code, notes, and snippets.

@shakalaca
shakalaca / build.prop
Created February 12, 2014 14:25
Information about PCHomeTalk
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=JDQ39
ro.build.display.id=wing_k70-eng 4.2.2 JDQ39 20140207 test-keys
ro.build.version.incremental=20140207
ro.build.version.sdk=17
ro.build.version.codename=REL
ro.build.version.release=4.2.2
ro.build.date=五 2月 7 13:01:22 CST 2014
ro.build.date.utc=1391749282
@shakalaca
shakalaca / gist:bfb581dbcfa5c71089e5
Created August 7, 2014 06:49
ZenFone adb connection under linux
新增 /etc/udev/rules.d/99-adb.rules,內容為
SUBSYSTEM=="usb",ATTR{idVendor}=="0b05",MODE="0666",GROUP="plugdev"
然後重新啟動 udev
sudo udevadm control --reload-rules
sudo service udev restart
接著插拔接著 ZenFone 的 USB 線看看 :)
#!/system/bin/sh
DATA_PARTITION=/dev/block/mmcblk0p10
SYSTEM_PARTITION=/dev/block/mmcblk0p9
if [ -L /dev/block/platform/intel/by-label/data ]; then
DATA_PARTITION=/dev/block/platform/intel/by-label/data
fi
if [ -L /dev/block/platform/intel/by-label/system ]; then
@shakalaca
shakalaca / 5_hearts
Created December 25, 2014 04:36
...
++++++++++ // set #0 to 10
[
>+++++ // add 5 to #1
>+++ // add 3 to #2
>++++++++++ // add 10 to #3
>+++++++++++ // add 11 to #4
<<<<- // decrement count in #0
] // in cell : [0,50,30,100,110]
>+++. // #1 : 50 + 3 = '5'
>++. // #2 : 30 + 2 = ' '
@shakalaca
shakalaca / build_applypatch.sh
Created March 3, 2015 14:56
Build applypatch
#!/bin/sh
# if you do not want to fetch source again ..
DO_NOT_FETCH=1
cd src
if [ -z "$DO_NOT_FETCH" ]; then
BRANCH=android-4.4.4_r2
#BRANCH=android-4.3_r3
保險起見,把所有必要檔案都 push 到 /data/local/tmp:
system/etc/recovery-resource.dat
boot.img
recovery/bin/install-recovery.sh
recovery/recovery-from-boot.p
接著 adb shell 切換到 /data/local/tmp,首先看一下 install-recovery.sh 的內容:
if ! applypatch -c EMMC:/dev/block/by-name/recovery:11956952:83a5dd9cab2246e73ecf9dffec6eef261bc40bf2; then

Keybase proof

I hereby claim:

  • I am shakalaca on github.
  • I am shakalaca (https://keybase.io/shakalaca) on keybase.
  • I have a public key whose fingerprint is 8837 D5A9 82B9 34DF EC0C B277 1121 8640 6712 A8AF

To claim this, I am signing this object:

@shakalaca
shakalaca / giffify.sh
Last active August 29, 2015 14:24 — forked from rock3r/giffify.py
#!/bin/sh
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return.
# ----------------------------------------------------------------------------
#
# Based upon http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
@shakalaca
shakalaca / gist:1489990
Created December 17, 2011 11:25
su-binary patch for ics 4.0.3 (sdk 15)
--- activity.cpp.old 2011-12-17 19:24:35.339670212 +0800
+++ activity.cpp 2011-12-17 19:18:13.427670430 +0800
@@ -75,6 +75,10 @@
// added in eclair rev 7
data.writeInt32(0);
}
+ if (sdk_version >= 15) {
+ // added in IceCreamSandwich 4.0.3
+ data.writeInt32(0); /* Selector */
+ }

開源之道

Original transcript: http://allisonrandal.com/2012/04/15/open-source-enlightenment/

這幾年來,我慢慢覺得,我們參與開源社群,就像是在一條道路上並肩而行:這不僅讓我們成為更好的程式設計者,也讓我們通過與人合作,而成為更好的人。

您可以將它想成一條修行之道,讓身而為人的我們能夠不斷成長。接下來,我想談談我對開源世界的個人觀點,希望能與您分享。

首先,人是一切開源專案的核心。程式碼是很重要,但最核心的永遠是人。