This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if Rails.env.development? | |
| MAX_LOG_SIZE = 10.megabytes | |
| logs = [File.join(Rails.root, 'log', 'development.log'), File.join(Rails.root, 'log', 'test.log')] | |
| logs.each do |log| | |
| if File.size?(log).to_i > MAX_LOG_SIZE | |
| $stdout.puts "Remove Log: #{log}" | |
| `rm #{log}` | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.content.Context; | |
| import android.util.AttributeSet; | |
| import android.view.MotionEvent; | |
| import android.widget.ScrollView; | |
| public class CustScrollView extends ScrollView { | |
| public CustScrollView(Context context) { | |
| super(context); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.reflect.Method; | |
| public class SystemPropertiesProxy { | |
| /** | |
| * This class cannot be instantiated | |
| */ | |
| private SystemPropertiesProxy() { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while read LINE | |
| do | |
| echo $LINE | |
| cd $LINE | |
| `git checkout android-4.3_r1.1` | |
| cd - | |
| done < .repo/project.list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 '/' '.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find -name "*.java" -exec 'cat' {} \; > a.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://central.sonatype.org/pages/ossrh-guide.html#create-a-ticket-with-sonatype |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install exiftool | |
| find . -path '*src/main/res/*' -name '*.png' -exec exiftool -overwrite_original -all= {} \; |
OlderNewer