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/zsh | |
function get_devices() { | |
all_devices=$(command adb devices) | |
# Drop the title | |
all_devices=${all_devices#"List of devices attached"} | |
# Drop any unauthorised devices (i.e. USB debugging disabled or authorisations revoked) | |
valid_devices=$(echo $all_devices | grep -v "([[:alnum:]-]+[[:space:]]+unauthorized$)" | grep -oE "([[:alnum:]-]+[[:space:]]+device$)") |
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
private val TickerCycleMillis = 150 | |
private object AlphabetMapper { | |
private val Alphabet = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789•".toList() | |
val size: Int = Alphabet.size | |
fun getLetterAt(index: Int): Char = Alphabet[index % size] | |
fun getIndexOf(letter: Char, offset: Int = 0): TickerIndex { |
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 'dart:convert'; | |
import 'dart:io'; | |
import 'package:html/dom.dart'; | |
import 'package:html/parser.dart'; | |
import 'package:dio/dio.dart'; | |
import 'package:pub_semver/pub_semver.dart'; | |
/// 안드로이드 버전을 가져옵니다 | |
/// | |
/// 구글은 API를 제공하지 않습니다 |
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
exports.parameterPermitter = function ({ params = [] }) { | |
if (!Array.isArray(params)) throw new Error(`Request Parameter ${params} is invalid parameters array`) | |
return function (req, res, next) { | |
res.locals.permitted = {} | |
params.forEach((param) => { | |
if (!req.body.hasOwnProperty(param)) throw new Error(`${param} is required`) | |
res.locals.permitted[param] = req.body[param] | |
}) |
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
public class Main { | |
public static void main(String[] args) { | |
System.out.println(maskString("ChangJoo Park", 3, '*')); | |
} | |
public static String maskString(String targetString, int numberOfPrefix, char maskCharacter) { | |
int stringLength = targetString.length(); | |
int postfixLength = stringLength - numberOfPrefix; | |
if (stringLength < numberOfPrefix) { |
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.Bundle | |
import android.support.annotation.CallSuper | |
import android.support.annotation.CheckResult | |
import android.support.design.widget.BottomSheetDialogFragment | |
import android.view.View | |
import com.trello.rxlifecycle2.LifecycleProvider | |
import com.trello.rxlifecycle2.LifecycleTransformer | |
import com.trello.rxlifecycle2.RxLifecycle | |
import com.trello.rxlifecycle2.android.FragmentEvent | |
import com.trello.rxlifecycle2.android.RxLifecycleAndroid |
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
default_platform :android | |
platform :android do | |
before_all do | |
ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABC/123/XYZ" | |
end | |
######################### PUBLIC LANES ######################### | |
desc "Deploy a new Prod APK version to Play Store Alpha" |
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
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |