This file contains 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 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
#define RANDOM(x) (rand()%x) | |
#define MAC_ADDR_LENGTH 6 | |
void macGen() { | |
uint8_t HEXCHAR[256]; | |
uint8_t MACAddr[MAC_ADDR_LENGTH]; | |
for (int j = 0; j < 256; j ++) { | |
HEXCHAR[j] = j; | |
} |
This file contains 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 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 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 | |
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 |
This file contains 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
productbuild --component xxx.app /Applications --sign "3rd Party Mac Developer Installer:" xxx.pkg |
This file contains 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= {} \; |
This file contains 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 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 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 |