Skip to content

Instantly share code, notes, and snippets.

View ibare's full-sized avatar
😃
I'm happy!!

Kim Mintae ibare

😃
I'm happy!!
  • WoowaBros
  • seoul, korea
View GitHub Profile
@ibare
ibare / bs.Dom-Agenda.md
Created August 7, 2014 00:53
bs.Dom 문서 목차

bs.Dom

Overview

  • bs.Dom은 무엇인가 설명

간단히 시작하기 (Getting started)

  • bsJS판 헬로 월드
function add(a, b) {
return a + b;
}
function sub(a, b) {
return a - b;
}
function multi(a, b) {
return a * b;
function double(a) {
return add(a, a);
}
function quarter(a) {
return div(a, 4);
}
@ibare
ibare / show.js
Last active August 29, 2015 14:16
HTML 의 Body 에 로그를 남기기
function show(msg, containerTag) {
var containerTag = containerTag || 'div';
var bodyElement = document.getElementsByTagName('body')[0];
var containerElement = document.createElement(containerTag);
var textNode = document.createTextNode(msg);
containerElement.appendChild(textNode);
bodyElement.appendChild(containerElement);
}
var etLanList = {
변수 : '변수는 값의 위치를 기억하는 저장소이다',
조건문 : '조건문은 값을 비교하여 실행 흐름을 변경하는 기능을 한다',
반복문 : '반복문은 같은 패턴을 반복되는 조건에서 실행하는 기능을 한다',
배열 : '배열은 하나의 이름을 공유하는 연속된 값들의 목록이다',
객체 : '객체는 이름을 공유하는 연속되지 않은 값들의 목록이다',
함수 : '함수는 코드의 묶음이고 이름을 호출하여 실행한다'
};
/*
@ibare
ibare / google-oauth-example.js
Created July 11, 2016 09:11
Google OAuto Example
let express = require('express');
let google = require('googleapis');
let app = express();
const CLIENT_ID = 'client-id';
const CLIENT_SECRET = 'client-secret';
const REDIRECT_URL = 'redirect-url';
let OAuth2 = google.auth.OAuth2;
let oauth2Client = new OAuth2(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL);
@ibare
ibare / Step1.js
Last active August 9, 2016 00:01
Move Box Tutorial
var box = $('#box');
function forwardPos(p) {
return (p+1)+'px';
}
function backwardPos(p) {
return (p-1)+'px';
}
@ibare
ibare / foo-box-step1.js
Last active August 16, 2016 00:08
혼자 바보같이 움직이는 박스 예제
// https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js
var adjust = 1;
var ui = $('#box');
var direction = ['up','right','down','left'];
function box() {
var min = 0, max = direction.length;
var selectDirection = Math.floor(Math.random()*(max-min+1)+min);
function WoowaView(options) {
return function() {
this.template = options.template;
this.render = function(list) {
var item = [];
for(var i=0; i<list.length; i++) {
item.push('<li>'+list[i]+'</li>')