Mozcの記号辞書に全角チルダを追加する
全角波ダッシュが一部の環境で文字化けするために全角チルダも使えるようにする。 // JavaScript unescape('%uff5e');// 全角チルダ:~ unescape('%u301c');// 波ダッシュ:〜 以下のファイルを開き vim data/symbol/symbol.tsv 波ダッシュについては以下のようになっているので 記号 〜 にょろ なみ から ー - ~ きごう...
View Articleapkからソースを読んでみる
Proguardを使ったアプリのapkを逆コンパイルしてソースを読んでみる。 unzip Hello.apk wget https://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip unzip dex2jar-0.0.9.15.zip classes.dexをjarに変換する。 ./dex2jar.sh ~/Hello/classes.dex...
View ArticleAWS SDK for PythonでRoute53を操作する
以下のスクリプトをサーバー起動時に実行する事でホスト名を固定する事ができる。 #!/usr/bin/python import sys import boto from boto.route53.record import ResourceRecordSets import boto.ec2 import json import pprint key = 'your key' secret =...
View ArticleZipInputStreamから文字列を取り出す
メモ。 ■ZipInputStream Zipはzip化されたデータとヘッダー情報から成る。 public static String readZIPStream(InputStream inputStream) throws IOException { String str = ""; String readed; ZipInputStream zis = new...
View ArticleIntent.ACTION_PICKで返ってきたIntentからBitmapを取り出す
以下のように画像選択画面を起動したとする。 Intent intent = new Intent(); intent.setAction(Intent.ACTION_PICK); intent.setType("image/*"); startActivityForResult(intent, GALLERY_REQUEST_CODE); 以下のようにしてbitmapを取り出せる。 Bitmap...
View Article