Skip to content

Instantly share code, notes, and snippets.

Minsuk Eom BoxResin

Block or report user

Report or block BoxResin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BoxResin
BoxResin / AnyTest.kt
Created Apr 23, 2019
* 만 인식하는 문자열 매칭
View AnyTest.kt
class AnyTest {
@Test
fun test() {
"스파게티".matches("*스파게티").let { println(it) }
"스파게티".matches("스파게티").let { println(it) }
"소스파게티".matches("*스파게티").let { println(it) }
"소스파게티".matches("스파게티*").let { println(it) }
"스파게티테".matches("*스파게티").let { println(it) }
}
@BoxResin
BoxResin / config.yml
Created Oct 20, 2018
CircleCI setting file
View config.yml
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-28-alpha
environment:
JVM_OPTS: -Xmx3200m
TZ: "/usr/share/zoneinfo/Asia/Seoul"
steps:
@BoxResin
BoxResin / build.gradle
Created Oct 14, 2018
Kotlin Library Startup
View build.gradle
apply plugin: 'kotlin'
// 의존성
dependencies {
// 로컬 JAR
implementation fileTree(dir: 'libs', include: ['*.jar'])
// 코틀린
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
@BoxResin
BoxResin / build.gradle
Last active Oct 26, 2018
Android Library Startup
View build.gradle
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/minyushov/gradle' }
}
dependencies {
@BoxResin
BoxResin / SchoolSearchView.kt
Created Sep 27, 2018
급식 앱 - 학교 검색 SearchView
View SchoolSearchView.kt
package winapi251.app.schoolmeal.ui.main
import android.content.Context
import android.database.MatrixCursor
import android.util.Log
import androidx.appcompat.widget.SearchView
import androidx.cursoradapter.widget.SimpleCursorAdapter
import kotlinx.coroutines.experimental.Dispatchers
import kotlinx.coroutines.experimental.GlobalScope
import kotlinx.coroutines.experimental.android.Main
@BoxResin
BoxResin / AndroidManifest.xml
Last active Oct 13, 2019
Android Startup Non-Stable
View AndroidManifest.xml
<!-- 안드로이드 매니페스트 -->
<manifest
package = "boxresin.app.barcodescanner"
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:tools = "http://schemas.android.com/tools">
<application
android:allowBackup = "false"
android:icon = "@mipmap/ic_launcher"
android:label = "@string/app_name"
@BoxResin
BoxResin / ExampleInstrumentedTest.kt
Last active Dec 21, 2018
AndroidJUnit4 + Robolectric
View ExampleInstrumentedTest.kt
package winapi251.app.schoolmeal
import android.content.Context
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
View AndroidStudio.gitignore
### Android ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
View git-commands.sh
// Move the branch pointer to a different commit
git branch -f branch-name commit-name
// Cancel merging
git reset --hard ORIG_HEAD
git reset --merge ORIG_HEAD ;; If you wanna keep your changes
// Cancel editing a file
git checkout -- <file>
@BoxResin
BoxResin / build.gradle
Last active Aug 15, 2017
Android DataBinding Gradle Setting for Kotlin
View build.gradle
// build.gradle of 'app' module.
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt' // Add this line.
android {
...
dataBinding {
enabled = true
}
}
dependencies {
You can’t perform that action at this time.