Skip to content

Instantly share code, notes, and snippets.

View mattak's full-sized avatar
👨‍💻
working

Takuma Maruyama mattak

👨‍💻
working
View GitHub Profile
@mattak
mattak / psv-uuid.sh
Created February 20, 2014 12:09
extract provisioning profile's UUID
#!/bin/sh
security cms -D -i $1 | grep -A 1 UUID | tail -1 | perl -p -ne 's|</?string>||g' | perl -p -ne 's|\s||g'
@mattak
mattak / unity.gradle
Created March 10, 2014 17:58
build.gradle for unity
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.8.+'
classpath 'com.deploygate:gradle:0.5'
}
}
@mattak
mattak / arec
Last active August 29, 2015 13:57
Android Record Program.
#!/bin/sh
SCREENRECORD_ANDROID_PATH=/sdcard/tmp.mp4
SCREENRECORD_LOCAL_PATH=tmp.mp4
TIME=10
SIZE=960x540
if [ $# -ge 1 ]; then
SCREENRECORD_LOCAL_PATH=$1
fi
@mattak
mattak / expect-android-update.sh
Last active August 29, 2015 13:57
type 'y' when update android sdk. usage : expect-android-update.sh sysimg-19
#!/bin/bash
OPTIONS="--no-ui --all --filter"
expect -c "
set timeout -1
spawn android update sdk $OPTIONS $@
expect {
\"Do you accept the license\" {
#!/bin/sh
# Delete all containers
sudo docker rm $(sudo docker ps -a -q)
# Delete all images
sudo docker rmi $(sudo docker images -q)
@mattak
mattak / dcc
Created March 31, 2014 07:35
docker clean container
#!/bin/sh
sudo docker rm $(sudo docker ps -a -q)
@mattak
mattak / irc.sh
Created April 2, 2014 02:05
irc post script with a single message.
#!/bin/sh
if [ $# -ne 4 ]; then
echo "usage: <server> <nick> <channel> <message>"
echo "ex: irc.example.com bot #chatroom hello"
exit
fi
SERVER=$1
PORT=6667
@mattak
mattak / emulatorwait.sh
Last active August 29, 2015 13:58
android emulator wait script.
#!/bin/sh
echo "please launch after: emulator -avd TARGET -no-window -no-boot-anim -no-audio"
# wait for launch
result=""
while [ -z "$result" ]; do
sleep 5
adb kill-server
adb start-server
@mattak
mattak / convertsize.rb
Created April 9, 2014 01:32
convert size of image
#!/usr/bin/env ruby
if ARGV.size < 1
puts "usage: <stdin list of files> | convertsize.rb <size>"
exit 0
end
STDIN.each do |line|
line.chomp!
src = line
@mattak
mattak / agif
Created April 10, 2014 01:21
animation gif from mp4 files
#!/usr/bin/env ruby
def run(cmd)
puts "$ #{cmd}"
`#{cmd}`
end
if ARGV.size < 1 || /.mp4$/i !~ ARGV[0]
puts "usage: agif <something.mp4>"
exit 0