Skip to content

Instantly share code, notes, and snippets.

View crossle's full-sized avatar
🌐

Crossle Song crossle

🌐
View GitHub Profile
@crossle
crossle / install_theos.sh
Created October 21, 2015 08:51 — forked from tom-go/install_theos.sh
Theos install script
#!/bin/bash
export THEOS=/opt/theos
# clone theos.git
cd /opt
git clone git://github.com/DHowett/theos.git
# clone iphoneheaders.git
cd $THEOS
mv include include.bak
productbuild --component xxx.app /Applications --sign "3rd Party Mac Developer Installer:" xxx.pkg
@crossle
crossle / gist:1de535e6a1d3f9fd48e6
Created May 26, 2015 06:59
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
brew install exiftool
find . -path '*src/main/res/*' -name '*.png' -exec exiftool -overwrite_original -all= {} \;
@crossle
crossle / ffmpeg_cmd_watermark.sh
Last active August 29, 2015 14:16
ffmpeg add watermark
input="$1"
output="$2"
ffmpeg -i "$input" -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:10 [out]" -vsync 2 -bsf:a aac_adtstoasc -acodec copy "$output"
@crossle
crossle / sonatype_create_repo
Created January 13, 2015 05:54
Sonatype create repo
http://central.sonatype.org/pages/ossrh-guide.html#create-a-ticket-with-sonatype
@crossle
crossle / gist:d8064c69fbd4b70f3f84
Created December 24, 2014 02:39
Merge multi file to one file
find -name "*.java" -exec 'cat' {} \; > a.txt
@crossle
crossle / FFmpeg compile for Linux
Last active August 29, 2015 14:09
FFmpeg compile config
./configure --disable-doc --disable-ffserver --enable-openssl --enable-gpl --enable-nonfree --enable-libx264 --enable-librtmp --enable-libmp3lame --enable-x11grab --extra-ldflags="-lstdc++"
make -j7 && make install
@crossle
crossle / dex.sh
Last active August 29, 2015 14:07 — forked from JakeWharton/dex.sh
function dex-method-count() {
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
}
function dex-method-count-by-package() {
dir=$(mktemp -d -t dex)
baksmali $1 -o $dir
for pkg in `find $dir/* -type d`; do
smali $pkg -o $pkg/classes.dex
count=$(dex-method-count $pkg/classes.dex)
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.')
@crossle
crossle / repo-switch
Created September 27, 2013 16:12
Convenient switch AOSP git repo
#!/bin/bash
while read LINE
do
echo $LINE
cd $LINE
`git checkout android-4.3_r1.1`
cd -
done < .repo/project.list
@crossle
crossle / SystemPropertiesProxy
Created February 27, 2013 09:15
Use the reflection invoke SystemProperites
import java.lang.reflect.Method;
public class SystemPropertiesProxy {
/**
* This class cannot be instantiated
*/
private SystemPropertiesProxy() {
}