Skip to content

Instantly share code, notes, and snippets.

View gimdongwoo's full-sized avatar

Dongwoo Gim gimdongwoo

View GitHub Profile
@gimdongwoo
gimdongwoo / GMapsSingle.html
Last active May 24, 2016 22:56
Google Maps in Titanium Webview
<!-- app/assets/html/GMapsSingle.html -->
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>GMapsSingle</title>
<style>
html, body {
height: 1920px;
@gimdongwoo
gimdongwoo / sendSMS.js
Last active May 25, 2016 08:32
Titanium Send SMS feature using native module ( https://github.com/omorandi )
// Special thanks to omorandi.
// Android : https://github.com/omorandi/TiAndroidSMS
// iOS : https://github.com/omorandi/TiSMSDialog
// need q.js https://github.com/kriskowal/q
var Q = require("q");
function makeSMSrecivers() {
//
// make smsReceivers
@gimdongwoo
gimdongwoo / stdDeviation.js
Last active June 10, 2016 08:48
Standard Deviation & Standard Score @javascript
// https://gist.github.com/matthutchinson/1648603
// http://jsfiddle.net/hiddenloop/TPeJt/
var array = [2, 3, 4, 6, 2, 5, 7, 2, 4, 5];
var within_std_of = 1;
outputResult = function(str) {
console.log(str);
}
@gimdongwoo
gimdongwoo / sms.js
Created September 28, 2016 12:44
Titanium Android SMS Send for listView clicked node
var Q = require("q");
var selectedModels = [];
// 리스크 클릭시 선택 처리
$.listView.addEventListener('itemclick', function(e){
var item = $.section.getItemAt(e.itemIndex);
var itemId = e.itemId;
var clickModel = notFriendContactsCol.get(itemId);
if (_.findWhere(selectedModels, clickModel)) {
item.checkIcon.image = '/images/friendlist_edit_un_checkbox.png';
// This is javascript code.
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
// This is javascript code.
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
// This is javascript code.
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
// This is javascript code.
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
// This is javascript code.
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
// Yeah!
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
@gimdongwoo
gimdongwoo / webpack.config.js
Last active January 21, 2019 13:58
AWS Lambda
'use strict';
const path = require('path');
const webpack = require('webpack');
const config = {
devtool: 'source-map',
entry: './src/index.ts',
output: {
path: path.resolve('./target'),
filename: 'index.js',