Skip to content

Instantly share code, notes, and snippets.

Working at home

Sohn, ByoungDae miconblog

Working at home
Block or report user

Report or block miconblog

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
miconblog / protips.js
Created Jul 10, 2018 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
View protips.js
// Promise.all is good for executing many promises at once
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
# AWS의 S3 버킷 정책을 미리 풀어둡니다.
"Version": "2012-10-17",
"Statement": [
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::rlibro/UPLOAD_PATH/*"
miconblog / autologin.js
Last active Aug 29, 2015
Login & Register Event with phantomjs
View autologin.js
var page = new WebPage();
var config = require('./config');
var loginsuccess = false;
var imageFormat = {format: 'png', quality: '10'};
var USER = {};
var USER_INDEX = 0;
page.onUrlChanged = function(targetUrl){
if( targetUrl === config.mainUrl ){
console.log("로그인 성공!");
miconblog / pipeline
Created Nov 7, 2014
execute promise collections
View pipeline
* Promises 객체를 순차적으로 실행시켜주는 파이프 라인 클래스
* .loop() - 무한 루프로 돌려준다. (default:0)
* .loop(1) - 루프를 한번만 돈다.
function noop (){}
module.exports = function Pipeline (promiseArray, params) {
var promises = promiseArray;
miconblog /
Last active Jul 2, 2017
deploy node app when git pushed.

Git 레파지토리 커밋하면 자동으로 배포하기

사전에 필요한 것들 (requirement..)

  1. git 프로토콜 사용을 위해 SSH 설정을 미리 해두세요! ( need SSH key )
  2. 배포 스크립트를 미리 만들어 두세요! ( need a script for dist )

데몬을 실행하는 방법 (How to start demon..)

$> node git2distd.js & 
View dbupdator.js
(function() {
var setUpIndicator = function(){
console.log("새로운 DB를 다운로드합니다.");
var setDownIndicator = function(){
console.log("데이터베이스를 완료!!");
You can’t perform that action at this time.