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
# Description: | |
# Operate the air conditioning of office. | |
# | |
# Commands: | |
# irkit aircon on - Switch on the air conditioning in the office | |
# irkit aircon off - Switch off the air conditioning in the office | |
module.exports = (robot) -> | |
IRKIT_API_MESSAGES = "https://api.getirkit.com/1/messages" | |
CLIENT_KEY = "client_key" |
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
#!/bin/sh | |
DATE=`date '+%y%m%d%H%M%S'` | |
adb shell screencap -p /sdcard/screen-${DATE}.png | |
adb pull /sdcard/screen-${DATE}.png | |
adb shell rm /sdcard/screen-${DATE}.png |
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
android { | |
compileOptions { | |
encoding = "UTF-8" | |
sourceCompatibility JavaVersion.VERSION_1_7 | |
targetCompatibility JavaVersion.VERSION_1_7 | |
} | |
} |
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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin"> |
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
SLICE_SIZE = 100 | |
def get_all_friends(screen_name) | |
client = twitter_client | |
all_friends = [] | |
client.friend_ids(screen_name).each_slice(SLICE_SIZE).each do |slice| | |
client.users(slice).each do |friend| | |
all_friends << friend | |
end |
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
export ANDROID_HOME="$HOME/android_sdk" | |
PATH="${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}" |
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
package jp.tsur.imageloaderlibrary; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.widget.ImageView; | |
import com.android.volley.RequestQueue; | |
import com.android.volley.toolbox.NetworkImageView; |
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
MessageDigest digest = null; | |
try { | |
digest = MessageDigest.getInstance("SHA-1"); | |
} catch (NoSuchAlgorithmException e) { | |
e.printStackTrace(); | |
} | |
byte[] apkBytes = new byte[0]; | |
try { | |
apkBytes = IOUtils.toByteArray(getAssets().open("app-debug.apk")); |
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
## picasso | |
https://github.com/square/picasso | |
- 機能が豊富 | |
- 複雑な画像の変形処理を最小のメモリ消費で実現できる | |
- 自動でメモリ・ファイルキャッシュをやってくれる | |
- デバッグ機能がある。読み込まれた画像がネットワーク・メモリ・ディスクのどこから読まれたのか分かるように画像の上に印が表示されるようにする機能と、詳細なログが出力される機能がある。 | |
## UniversalImageLoader | |
https://github.com/nostra13/Android-Universal-Image-Loader |
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
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams(); | |
params.setBehavior(new ScrollFABBehavior()); | |
fab.setLayoutParams(params); |