const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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
# ==================== Emojis ==================== | |
# 🎉 :tada: 初めてのコミット(Initial Commit) | |
# 🔖 :bookmark: バージョンタグ(Version Tag) | |
# ✨ :sparkles: 新機能(New Feature) | |
# 🐛 :bug: バグ修正(Bagfix) | |
# ♻️ :recycle: リファクタリング(Refactoring) | |
# 📚 :books: ドキュメント(Documentation) | |
# 🎨 :art: デザインUI/UX(Accessibility) |
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
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
final RecyclerView recyclerView = new RecyclerView(this); | |
setContentView(recyclerView); | |
recyclerView.setHasFixedSize(true); |
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.support.design.widget.CoordinatorLayout | |
android:id="@+id/main_content" | |
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.support.design.widget.AppBarLayout | |
android:id="@+id/appbar" | |
android:layout_width="match_parent" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- google's material design colours from | |
http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
<!--reds--> | |
<color name="md_red_50">#FFEBEE</color> | |
<color name="md_red_100">#FFCDD2</color> | |
<color name="md_red_200">#EF9A9A</color> |
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 com.cyrilmottier.android.resourcesadditions; | |
import android.content.res.Resources; | |
import android.content.res.XmlResourceParser; | |
import android.os.Bundle; | |
import org.xmlpull.v1.XmlPullParser; | |
import org.xmlpull.v1.XmlPullParserException; | |
/** | |
* @author Cyril Mottier |
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
echo "start adb shell capture" | |
DATE=$(date +%Y%m%d%H%M%S) | |
FILENAME=${DATE}.mp4 | |
DROPBOX_ID=462856 | |
adb shell screenrecord --verbose --time-limit 5 --size 540x960 /sdcard/demo.mp4 | |
adb pull /sdcard/demo.mp4 ~/Dropbox/Public/capture/${FILENAME} | |
adb shell rm /sdcard/temp.png | |
DROPBOX_URL=https://dl.dropboxusercontent.com/u/${DROPBOX_ID}/capture/${FILENAME} |
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
echo "start adb shell capture" | |
DATE=$(date +%Y%m%d%H%M%S) | |
FILENAME=${DATE}.png | |
DROPBOX_ID=462856 | |
adb shell screencap -p /sdcard/temp.png | |
adb pull /sdcard/temp.png ~/Dropbox/Public/capture/${FILENAME} | |
adb shell rm /sdcard/temp.png | |
DROPBOX_URL=https://dl.dropboxusercontent.com/u/${DROPBOX_ID}/capture/${FILENAME} |
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
/** | |
* タブの切替毎に必要なFragmentを取得するためのAdapterクラス | |
*/ | |
public static class SectionsPagerAdapter extends FragmentPagerAdapter { | |
private final Context mContext; | |
private final ViewPager mViewPager; | |
private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>(); | |
private static final class TabInfo { | |
private final Class<?> clazz; |
NewerOlder