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 / bbox
Created August 6, 2011 13:49
embed jpeg bounding box information
#!/bin/sh
# -*- encoding:utf-8 -*-
exiftool=`which exiftool`
# is exif tool already installed?
if [ -z $exiftool ]; then
echo "please install exiftool."
echo "sudo apt-get install libimage-exiftool-perl"
exit 1
@mattak
mattak / unfreeze
Created August 18, 2011 11:38
unfreeze file on linux
#!/bin/sh
usage ()
{
echo "usage: unfreeze <some freezed file>"
echo "supported file:"
echo " .tar.bz2"
echo " .tbz2"
echo " .tbz"
echo " .tgz"
@mattak
mattak / bing.clj
Created December 4, 2011 04:49
bing image search api. PLEASE INSERT YOUR APIKEY IN USE
#! /usr/bin/env clojure
(import '(org.apache.http HttpHost)
'(org.apache.http.client HttpClient)
'(org.apache.http.client.methods HttpGet)
'(org.apache.http.impl.client DefaultHttpClient)
'(org.apache.http.conn.params ConnRoutePNames)
'(java.io File
BufferedReader InputStreamReader
InputStream FileInputStream
OutputStreamWriter FileOutputStream))
@mattak
mattak / logcat
Created November 9, 2012 07:12
Simplify android logcat.
#!/usr/bin/env ruby
#
# adb logcat をもっと見やすく.
#
require 'optparse'
#
# global option.
@mattak
mattak / ashot
Last active December 14, 2015 14:19
android easy screen capture
#!/bin/sh
#
# Android easy screen capture.
#
# usage:
# ashot
# ashot shot1.png
#
@mattak
mattak / refe
Created March 23, 2013 05:40
refe manual
#!/bin/sh
#
# ruby manual refe
#
rubyrefm=$HOME/src/rubyrefm
ruby -Ke -I \
$rubyrefm/bitclust/lib \
$rubyrefm/bitclust/bin/refe \
#!/bin/sh
##
# usage:
# question "Are you good?"
# answer=$?
# if [ $answer -eq 1 ]; then
# echo "ok"
# fi
function question() {
@mattak
mattak / ljust
Created April 8, 2013 00:20
ruby like command line string formatter.
#!/bin/sh
#
# ljust
#
# ruby like command line string formatter.
#
#
# usage:
@mattak
mattak / apkdump
Created April 8, 2013 14:42
dump android apk file. it requires "dex2jar", "apktool", "jad".
#!/bin/sh
if [ $# -lt 1 ]; then
echo "usage: [apk file]"
exit 0
fi
APKFILE=$1
APKTOOL=apktool
D2J=d2j-dex2jar.sh
@mattak
mattak / dpifile
Created April 9, 2013 11:56
rename drawable-{xx}dpi/${from}.png -> drawable-{xx}dpi/${to}.png
#!/bin/sh
#
# dpifile
#
# usage: dpifile help ic_help
#
if [ $# -lt 2 ]; then
echo "usage: [fromfile] [to_file]"