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 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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.support.v7.widget.RecyclerView | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
/** | |
* RootAdapter | |
*/ | |
abstract class RootAdapter<T>(protected val items: MutableList<T> = mutableListOf(), | |
private val onItemClickListener: (T) -> Unit = {}, |
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
package ${PACKAGE_NAME} | |
#parse("File Header.java") | |
import androidx.room.Dao | |
import androidx.room.Insert | |
import androidx.room.Update | |
import androidx.room.Query | |
@Dao |
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
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const db = admin.database(); | |
const ref = db.ref("/switch"); |
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/bash | |
grep -rnw '.' -e 'android.support' |
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.os.Build; | |
import android.os.HandlerThread; | |
import android.os.Process; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicReference; | |
import io.reactivex.BackpressureStrategy; | |
import io.reactivex.Completable; | |
import io.reactivex.Flowable; |
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
fun <T> Maybe<T>.save(saveFunction: (T) -> Unit): Maybe<T> { | |
return MaybeSave(this, saveFunction) | |
} | |
private class MaybeSave<T>(val source: MaybeSource<T>, val saveFunction: (T) -> Unit) : Maybe<T>() { | |
override fun subscribeActual(observer: MaybeObserver<in T>) { | |
source.subscribe(MaybeSaveObserver<T>(observer, saveFunction)) | |
} |
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.util.Log | |
/** | |
* AndroidExtensions | |
*/ | |
/** | |
* Any | |
* */ | |
fun Any.info(text: String) { |
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 IpAddress.Companion.IP_END | |
import IpAddress.Companion.IP_SEGMENT_SIZE | |
import IpAddress.Companion.IP_START | |
import kotlinx.coroutines.experimental.runBlocking | |
import java.net.URL | |
/** | |
* Ipfy | |
*/ | |
data class IpAddress(private val segment1: Int, |
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
fun String.normalize(): String { | |
val map = mutableMapOf<Char, Char>() | |
map.put('À', 'A') | |
map.put('Á', 'A') | |
map.put('Â', 'A') | |
map.put('Ã', 'A') | |
map.put('Ä', 'A') | |
map.put('È', 'E') | |
map.put('É', 'E') | |
map.put('Ê', 'E') |