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.graphics.Paint; | |
| import android.util.AttributeSet; | |
| import android.util.TypedValue; | |
| import android.widget.TextView; | |
| /** | |
| * サイズ自動調整TextView | |
| * | |
| */ |
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
| EditText editText = new EditText(this); | |
| editText.setInputType(InputType.TYPE_CLASS_TEXT); | |
| editText.setFilters(new InputFilter[] {new InputFilter.LengthFilter(10)}); |
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
| (1..100).each{|i| puts i % 15 == 0 ? 'Fizz Buzz' : i % 3 == 0 ? 'Fizz' : i % 5 == 0 ? 'Buzz' : i} |
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
| private void debugVersionInfo() { | |
| try { | |
| PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA); | |
| int versionCode = packageInfo.versionCode; | |
| String versionName = packageInfo.versionName; | |
| Log.d(TAG, "versionCode:" + versionCode); | |
| Log.d(TAG, "versionName:" + versionName); |
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
| # built application files | |
| *.apk | |
| *.ap_ | |
| # files for the dex VM | |
| *.dex | |
| # Java class files | |
| *.class |
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.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Matrix; | |
| /** | |
| * 画像変換クラス | |
| * | |
| */ | |
| public class BitmapUtil { |
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
| git config --global push.default upstream |
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
| #!/usr/bin/env bash | |
| set -e | |
| [ -n "$RBENV_DEBUG" ] && set -x | |
| # Provide rbenv completions | |
| if [ "$1" = "--complete" ]; then | |
| echo system | |
| exec rbenv-versions --bare | |
| fi |
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
| $ mkdir ~/bin | |
| $ cd ~/bin | |
| $ wget http://bitbucket.org/vpetro/applescript/raw/7f3ac525ffa0/term | |
| $ chmod +x term |
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://d.hatena.ne.jp/clover-leaf/20110126/1296058882 |