Skip to content

Instantly share code, notes, and snippets.

/**
* Created by aleckim on 2016. 5. 10..
* cordova-hot-code-push 라고 code update해주는 plugin도 있음.
* 최신 버전을 업로드 하여도, ios, android모두 못 찾음.
* progress 동작 확인 필요.
*/
angular.module('service.deploy', [])
.run(function($ionicPlatform, $ionicPopup, $ionicLoading) {
@kimalec
kimalec / gist:e795bbff6c894e8a9cfacc7118938e08
Last active May 9, 2016 03:39
implement 3k0/cordova-plugin-purchase
if (!window.store) {
console.log('in app purchase is not ready');
return;
}
store.verbosity = store.DEBUG;
store.register({
id: Purchase.productId,
alias: Purchase.productId,
@kimalec
kimalec / service.twads for com.admob.plugin
Created May 2, 2016 09:55
service.twads for com.admob.plugin
/**
* Created by aleckim on 2016. 4. 20..
*/
angular.module('service.twads', [])
.factory('TwAds', function($rootScope, Util) {
var obj = {};
obj.enableAds;
obj.showAds;
obj.requestEnable;
@kimalec
kimalec / getLifeIndexKma.js
Created November 7, 2015 02:17
get life index from KMA
var senTemp = 0;
var ultrv = 0;
var townList = [];
townList.push({first: '서울특별시', second:'마포구', third: '', lat: 37.5813, lon: 126.9317, areaNo: '1144000000'});
townList.push({first: '서울특별시', second:'마포구', third: '공덕동', lat: 37.54744167, long: 126.9620889, areaNo: '1144056500'});
townList.push({first: '서울특별시', second:'마포구', third:'대흥동', lat: 37.55305, lon: 126.9448111, areaNo: '1144060000'});
townList.push({first: '서울특별시', second:'마포구', third:'도화동', lat: 37.5349, lon: 126.9521306, areaNo: '1144058500'});
townList.push({first: '서울특별시', second:'마포구', third:'망원제1동', lat: 37.55243333, lon: 126.9077667, areaNo: '1144069000'});
townList.push({first: '서울특별시', second:'마포구', third:'망원제2동', lat: 37.55756389, lon: 126.9043111, areaNo: '1144070000'});
@kimalec
kimalec / getPmInfo.js
Last active November 7, 2015 02:47
get pm10 info from KECO(Airkorea)
//<script src="lib/xml2json/xml2json.js"></script>
var pm10value = 0;
function getTmPointFromWgs84(key, y, x, callback) {
var url = 'https://apis.daum.net/local/geo/transcoord';
url += '?apiKey='+key;
url += '&fromCoord=WGS84';
url += '&x='+x;
@kimalec
kimalec / git_squashing_commits.sh
Created May 31, 2015 07:31
Successfully Squashing Commits
$ git rebase -i HEAD~3
[detached HEAD b19f9fb] Fixed #254 convert between tag and hashtag
Date: Wed May 27 21:06:33 2015 +0900
6 files changed, 150 insertions(+), 14 deletions(-)
Successfully rebased and updated refs/heads/254_convertHashTag.
@kimalec
kimalec / gitrebase_squashingCommit.txt
Created May 31, 2015 07:26
git squashing commits
pick 1224925 #254 convert between tag and hashtag
squash 214f000 #254 convert between tag and hashtag
squash fc102d5 Fixed #254 convert between tag and hashtag
# Rebase ec88b42..fc102d5 onto ec88b42 ( 3 TODO item(s))
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
@kimalec
kimalec / gitRebaseContinue.sh
Created May 24, 2015 04:02
git rebase continue
$ git rebase --continue
Applying: category tag 맞추어 동기화 하기. Fixed #214
$ git log | more
commit 043e541aa84c67e8fdfaf67670579fc352822a80
Author: Alec Kim <kimalec7@gmail.com>
Date: Thu May 21 01:20:38 2015 +0900
category tag 맞추어 동기화 하기. Fixed #214
@kimalec
kimalec / gitaddwhenconflicting.sh
Created May 24, 2015 03:59
git add when conflicting
$ git add controllers/blogConvert.js
$ git add test/test_blogConvert.js
$ git status
rebase in progress; onto 8288a5d
You are currently rebasing branch '214_category_tag_sync' on '8288a5d'.
(all conflicts fixed: run "git rebase --continue")
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
@kimalec
kimalec / gitstatus.sh
Created May 24, 2015 03:54
gitstatus when conflicting
$ git status
rebase in progress; onto 8288a5d
You are currently rebasing branch '214_category_tag_sync' on '8288a5d'.
(fix conflicts and then run "git rebase --continue")
(use "git rebase --skip" to skip this patch)
(use "git rebase --abort" to check out the original branch)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)