Skip to content

Instantly share code, notes, and snippets.

View SeongUgJung's full-sized avatar

Steve SeongUg Jung SeongUgJung

View GitHub Profile
@SeongUgJung
SeongUgJung / gist:6000111a88e9b24f65c6
Last active August 29, 2015 14:04
android-play-publisher-api-sample-maven-dependency
<dependencies>
<dependency>
<groupid>com.google.apis</groupid>
<artifactid>google-api-services-androidpublisher</artifactid>
<version>v2-rev2-1.19.0</version>
</dependency>
<dependency>
<groupid>com.google.oauth-client</groupid>
<artifactid>google-oauth-client-java6</artifactid>
@SeongUgJung
SeongUgJung / gist:d2836c0721ca72cfe7d5
Created August 2, 2014 03:15
android-play-publisher-api-sample-applicationconfig
static final String APPLICATION_NAME = "android-publisher-sample/1.0";
static final String PACKAGE_NAME = "com.nobrain.pulisher_sample";
public static final String APK_FILE_PATH = "/app-release.apk";
static final String SERVICE_ACCOUNT_EMAIL = ""; // must be empty!!!
@SeongUgJung
SeongUgJung / gist:f947b7ac194a57f37db5
Last active August 29, 2015 14:04
android-play-publisher-api-sample-androidpublisherhelper
private static final String RESOURCES_CLIENT_SECRETS_JSON = "/client_secrets.json";
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'groovy'
apply plugin: 'maven'
group = 'com.nobrain.gradle'
apply plugin: 'signing'
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
@SeongUgJung
SeongUgJung / MagneticPlateView.java
Last active August 29, 2015 14:12
Android RxJava 와 Lambda
@EView
public class MagneticPlateView extends View {
// ...중략...
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.save();
@SeongUgJung
SeongUgJung / 10!
Created January 21, 2015 04:45
10!
def factor(x : Int, y: Int):Int = {
if (x == 1) {
return y
} else {
return factor(x-1, x*y)
}
}
factor(10,1)
@SeongUgJung
SeongUgJung / fork_join
Created January 30, 2015 03:29
like fork & join as RxJava-Android
void refreshTokenAndGoNextActivity(long initTime) {
// like fork & join...but need to refactor
Observable.combineLatest(Observable.create(new Observable.OnSubscribe<Integer>() {
@Override
public void call(Subscriber<? super Integer> subscriber) {
new Thread(new Runnable() {
@Override
public void run() {
@SeongUgJung
SeongUgJung / gist:510437b16c0f27bcb729
Created February 28, 2015 01:28
지역변수 DI 하기..
void doSomething () {
IUserSessionDao dao = getUserSessionDao(isParents);
// 생략
}
IUserSessionDao getUserSessionDao(boolean isParents) {
IUserSessionDao userSessionDao;
if (isParents) {
publishSubject = PublishSubject.create();
messageSubscription = publishSubject.observeOn(Schedulers.io())
.subscribe(loadType -> {
switch (loadType) {
case Saved:
getSavedMessageList();
break;
case Old: