Skip to content

Instantly share code, notes, and snippets.

@rainyear
rainyear / root_android.sh
Last active December 19, 2015 08:19
root android emulator 4.2.2
cd adt-X/sdk/platform-tools/
./adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
# try
cat sh > su
#!/usr/bin/python
from distutils.sysconfig import get_python_lib
print get_python_lib()
@rainyear
rainyear / x.sublime-build
Last active December 18, 2015 21:29
compile & run scripts in sublime text.
//Java.sublime-build
{
"cmd": ["javac", "$file"],
"selector": "source.java",
"encoding": "cp936",
"variants":
[{
"name": "Run",
"cmd": ["java", "$file_base_name"]
}]
@rainyear
rainyear / javar.sh
Created June 24, 2013 05:44
compile and run java script
[ -f "$1.class" ] && rm $1.class
for file in $1.java
do
echo "Compiling $file........"
javac $file
done
if [ -f "$1.class" ]
then
echo "-----------OUTPUT-----------"
java $1
;.inputrc
set completion-ignore-case on
;.screenrc
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rY}%n %t%{-}%+w %=%{..G} %H(%l) %{..Y} %Y/%m/%d %c:%s "
@rainyear
rainyear / find_file_type_counts.sh
Last active December 18, 2015 07:19
find out how many files of specific type are there in current project.
find . -type f -name *.java | wc