Skip to content

Instantly share code, notes, and snippets.

View cwdoh's full-sized avatar

Changwook Doh cwdoh

View GitHub Profile
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.JobIntentService;
import android.util.Log;
import android.widget.Toast;
import
/**
* Example implementation of a JobIntentService.
*/
public class UpdateJobIntentService extends JobIntentService {
@cwdoh
cwdoh / JobSchedulerSample.java
Last active June 8, 2018 08:21
JobScheduler
class JobSchedulerSample {
private static final int JOB_ID_UPDATE = 0x1000;
static void setUpdateJob(Context context) {
// 대용량 데이터를 업데이트하기 위한 적정 조건 설정
JobInfo job =
new JobInfo.Builder(
// Job에 설정할 Id 값
JOB_ID_UPDATE,
// 조건 만족 시 UpdateDataByWiFiService가 실행
interface Heater {
fun on()
fun off()
fun isHot() : Boolean
}
class ElectricHeater(var heating: Boolean = false) : Heater {
override fun on() {
println("~ ~ ~ heating ~ ~ ~")
heating = true
@cwdoh
cwdoh / SyncJobService.java
Last active June 26, 2017 08:35
Scaffolding JobService
package com.example.android.jobscheduler.service;
import android.app.job.JobParameters;
import android.app.job.JobService;
import android.content.Intent;
public class SyncJobService extends JobService {
ArtworkDownloader mDownloader;
@Override
@cwdoh
cwdoh / out.js
Created December 9, 2016 08:12
print '1 234 56 7'
// 조건:
// 입력 없음
// 출력값: 1 234 56 7
let i = 1
[1, 3, 2, 1].map(c => { let o =''; while (c--) { o += i++ } return o }).join(' ')
#!/usr/bin/env bash
# Setup script for hacking chrome devtools
# Source -> https://medium.com/p/8c8896f5cef3
echo "Creating folder and initialize a git repo"
mkdir devtools-frontend && cd devtools-frontend
git init
echo "Adding chromium remote and initialize sparse checkout"
git remote add upstream https://chromium.googlesource.com/chromium/blink

Introduction

ccache is a compiler cache. It speeds up recompilation of C/C++ code by caching previous compilations and detecting when the same compilation is being done again. This often results in a significant speedup in common compilations, especially when switching between branches. This page is about using ccache on Mac with clang and ninja build system. If you want to use Xcode, please refer to the old CCacheMac page.

In order to use ccache with clang, you need to use the current git HEAD, since the most recent version (3.1.9) doesn't contain the patch needed for using chromium style plugin.

Installation

To install ccache with [homebrew](http://mxcl.

1
00:00:00,000 --> 00:00:01,054
ERIC BIDELMAN : 환영합니다, 여러분.
ERIC BIDELMAN:
Welcome, everyone.
2
00:00:01,054 --> 00:00:01,137
저는 에릭 바이들먼(Eric Bidelman) 입니다.
@cwdoh
cwdoh / designer.html
Created July 26, 2014 03:23
designer
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<polymer-element name="my-element">
<template>
<style>
@cwdoh
cwdoh / designer.html
Created July 25, 2014 15:51
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<polymer-element name="my-element">
<template>
<style>