$ nginx
This file contains 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 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
#顔文字固定で色ランダム | |
PROMPT=$'%{\e[$[32+$RANDOM % 5]m%}(。◕‿◕。)%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
#顔文字も色もランダム | |
FACE_CHAR=("(。◕‿◕。) " "(・∀・)ノ " "( ゚Д゚) " "(。╹ω╹。)" "♡♡♡♡" "☆☆☆☆") | |
PROMPT=$'%{\e[$[32+$RANDOM % 5]m%}$FACE_CHAR[$[$RANDOM % ${#FACE_CHAR[@]} + 1]]%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' |
This file contains 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 | |
dir=$(dirname $0) | |
java -jar "$dir/bundletool-all-0.3.3.jar" $@ |
This file contains 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
def supportLibraryVersion = '27.1.1' | |
android { | |
// ... | |
defaultConfig { | |
// ... | |
multiDexEnabled true | |
} | |
This file contains 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
task searchCompileDependencies() { | |
doLast { | |
configurations.find { it.name == 'compile' }?.dependencies?.each { | |
println "$it.group:$it.name" | |
} | |
} | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_anchor="@id/toolbar" | |
tools:context=".MainActivity"> | |
<android.support.design.widget.AppBarLayout |
This file contains 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
public class SampleFragment extends Fragment { | |
/** Fragmentで保持しておくデータ */ | |
private int mData; | |
/** | |
* Fragmentインスタンスを生成した返却. | |
* | |
* コンストラクタに引数を渡すのはダメ。 | |
* Fragmentがメモリ不足で破棄され、そこから復帰する時に空のコンストラクタ呼ばれる。 |
This file contains 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
def robolectricDependenciesFolder = project.rootDir.path + "/.robolectric-dependencies" | |
configurations.create('robolectricRuntime') | |
dependencies { | |
robolectricRuntime "org.robolectric:android-all:o-preview-4-robolectric-0" | |
} | |
rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") { | |
from configurations.robolectricRuntime |
This file contains 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
#include "B2DebugDrawLayer.h" | |
USING_NS_CC; | |
B2DebugDrawLayer *B2DebugDrawLayer::create(b2World *pB2World, float pPtmRatio) | |
{ | |
B2DebugDrawLayer *pRet = new B2DebugDrawLayer(pB2World, pPtmRatio); | |
if (pRet && pRet->init()) { | |
pRet->autorelease(); | |
return pRet; |