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.spring.coroutine | |
| import io.r2dbc.spi.ConnectionFactory | |
| import org.springframework.boot.autoconfigure.SpringBootApplication | |
| import org.springframework.boot.runApplication | |
| import org.springframework.context.support.beans | |
| import org.springframework.core.io.ClassPathResource | |
| import org.springframework.data.annotation.Id | |
| import org.springframework.data.r2dbc.connectionfactory.init.CompositeDatabasePopulator | |
| import org.springframework.data.r2dbc.connectionfactory.init.ConnectionFactoryInitializer |
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
| /** | |
| output: | |
| main run in [ main ] | |
| fetchData run in [ DefaultDispatcher-worker-1 ] | |
| runApplication run in [ main ] result: [ Hello Coroutine ] | |
| */ | |
| import kotlinx.coroutines.* | |
| fun main() = runBlocking { |
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
| buildscript { | |
| repositories { | |
| maven { url "https://repo1.maven.org/maven2" } | |
| } | |
| dependencies { | |
| classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.4.RELEASE") | |
| } | |
| } | |
| allprojects { |
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
| import { action, observable } from 'mobx' | |
| import { MobXProviderContext, observer, Provider } from 'mobx-react' | |
| import React, { useContext } from 'react' | |
| class CounterViewModel { | |
| @observable count: number = 0 | |
| @action.bound public plus() { | |
| this.count++ | |
| } |
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
| cat <<EOF | kubectl apply -f - | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: tiller | |
| namespace: kube-system | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRoleBinding | |
| metadata: |
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
| kubectl config view --raw \ | |
| -o=jsonpath='{.clusters[0].cluster.certificate-authority-data}' \ | |
| | base64 --decode | |
| cat <<EOF | kubectl apply -f - | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: gitlab-admin | |
| namespace: kube-system |
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
| @file:Suppress("IllegalIdentifier") | |
| package com.novonetworks.mojito.common.db.dao | |
| import android.arch.persistence.room.Room | |
| import com.novonetworks.mojito.BuildConfig | |
| import com.novonetworks.mojito.base.TestApp | |
| import com.novonetworks.mojito.common.db.AppDatabase | |
| import com.novonetworks.mojito.common.vo.Owner | |
| import com.winterbe.expekt.should |
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
| <templateSet group="AndroidKotlinTimber"> | |
| <template name="timd" value="timber.log.Timber.d("$METHOD_NAME$: $content$")" description="Timber.d(String)" toReformat="true" toShortenFQNames="true"> | |
| <variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> | |
| <variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="KOTLIN_STATEMENT" value="true" /> | |
| </context> | |
| </template> | |
| <template name="time" value="timber.log.Timber.e("$METHOD_NAME$() error with: e = [ $exception$$END$ ]")" description="Timber.e(String, Exception)" toReformat="true" toShortenFQNames="true"> | |
| <variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" /> |
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.novonetworks.eng.core.util; | |
| /* | |
| * Created by orange on 2016-12-29. | |
| */ | |
| import android.util.Log; | |
| import com.crashlytics.android.Crashlytics; |
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 auth | |
| import ( | |
| "crypto/rsa" | |
| "eng-server/api/utils" | |
| jwt "github.com/dgrijalva/jwt-go" | |
| "github.com/kataras/iris" | |
| "reflect" | |
| "strings" | |
| "time" |