フロントエンドを楽にするために
Qiitaを支えたい技術 at 時雨祭
- HN: mizchi
- Qiitaの方からきました(入社半年たったらしい)
- Reactオジサンはそろそろ飽きてきた
- Angularに興味が無いのでこっちにきた
| import android.content.Context; | |
| import android.os.Debug; | |
| import java.io.File; | |
| public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
| private static final String FILENAME = "out-of-memory.hprof"; | |
| public static void install(Context context) { | |
| Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |
| import android.content.Context; | |
| import java.io.File; | |
| import io.realm.Realm; | |
| import io.realm.RealmMigration; | |
| import io.realm.exceptions.RealmMigrationNeededException; | |
| public class RealmUtils { | |
| Applicati |
| private class HttpInterceptor implements Interceptor { | |
| @Override | |
| public Response intercept(Chain chain) throws IOException { | |
| Request request = chain.request(); | |
| //Build new request | |
| Request.Builder builder = request.newBuilder(); | |
| builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |
| public class ObjectGsonParceler { | |
| private final Gson gson; | |
| public ObjectGsonParceler(Gson gson) { | |
| this.gson = gson; | |
| } | |
| public Parcelable wrap(Object instance) { | |
| try { | |
| String json = encode(instance); |
| import android.content.Context; | |
| import android.text.Editable; | |
| import android.text.Spannable; | |
| import android.text.TextWatcher; | |
| import android.text.style.RelativeSizeSpan; | |
| import android.util.AttributeSet; | |
| import android.widget.EditText; | |
| public class TitledEditText extends EditText implements TextWatcher{ | |
| # -*- encoding:utf-8 -*- | |
| # | |
| # CentOSをセキュアにセットアップするFabricスクリプト | |
| # | |
| # This software is released under the MIT License, see LICENSE.txt. | |
| ##################################################################### | |
| from fabric.api import env, run, sudo, put | |
| from fabric.colors import green | |
| from fabric.decorators import task |
| #Android and CI and Gradle (A How-To) | |
| There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
| The Android platform is not one of them. | |
| Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
| But fear not! It can be done! | |
| Before we embark on our journey, you'll need a few things to run locally: |