Skip to content

Instantly share code, notes, and snippets.

@fronteer-kr
fronteer-kr / ex.js
Last active August 29, 2015 14:14
phantomjs 샘플
var page = require('webpage').create();
page.open('http://www.daum.net', function () {
page.render('daum.png');
phantom.exit();
});
@fronteer-kr
fronteer-kr / index.html
Created February 6, 2015 06:39
node-webkit HelloWorld
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<h2>여러분 안녕하세요</h2>
We are using node.js <script>document.write(process.version)</script>.
@fronteer-kr
fronteer-kr / gist:7c878ac7b94c09c45998
Created January 22, 2015 02:28
pagination 관련 css 정리 (2015.1.22)
.pagination { margin: 0;}
.pagination > li.disabled > a, .pagination > li.disabled > span { color: #eee; }
.pagination,
.pagination ~ .rowOption {display: inline-block; margin-left:5px;}
.pagination ~ .rowOption > span {
float: left;
position: relative;
padding: 6px 12px;
margin-right: 4px;
@fronteer-kr
fronteer-kr / to-be
Created January 21, 2015 11:49
pagination 태그 샘플
<div class="meta-pagination">
<ul class="pagination">
<li class="page active"><a href="#none" data-page="1">1</a></li>
<li class="page"><a href="#none" data-page="2">2</a></li>
<li class="page"><a href="#none" data-page="3">3</a></li>
<li class="page"><a href="#none" data-page="4">4</a></li>
</ul>
<div class="rowOption">
<span class="rowCount">총13개</span>
<select name="rowPerPage">
@fronteer-kr
fronteer-kr / as-is
Created January 21, 2015 05:47
기간(from-to) 표시 (예) - 개선필요
<div class="row">
<div class="col-sm-6">
<div class="input-group date metaui-datepicker">
<input type="text" name="from_date" class="form-control metaui-datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar">
</i>
</span>
</div>
</div>
@fronteer-kr
fronteer-kr / gist:78f2cc819d9a6dd1e17e
Last active August 29, 2015 14:13
fronteer.kr 게시판에 gist 연동
// (예)
// ![:gist](userId/gistId)
![:gist](fronteer-kr/262b9eaa6b7d9dfcc433)
@fronteer-kr
fronteer-kr / bootstrap.less
Last active August 29, 2015 14:13
harp.js 에서 bootstrap less compile
// 상대경로는 적절하게 변경해야..
@import "./_less/bootstrap.less";
@fronteer-kr
fronteer-kr / less.js
Created January 5, 2015 07:02
harp.js less source mapping 보충
// 파일 위치 - node_modules\harp\node_modules\terraform\lib\stylesheet\processors\less.js
// 파일 하단부분 (대략 25 line 부근) 수정
parser.parse(fileContents.toString(), function (e, tree) {
if(e) return callback(formatError(e))
try{
var error = null
//var css = tree.toCSS({ compress: true }) // 수정전
var css = tree.toCSS({ compress: true, sourceMap: true, outputSourceFiles: true }) // 수정후
@fronteer-kr
fronteer-kr / click handler
Last active August 29, 2015 14:12
Click 이벤트 중복 방지처리
var _lastCickTime = new Date().getTime();
document.addEventListener('click', function (e) {
var clickTime = e['timeStamp'];
if (clickTime && (click_time - _lastCickTime) < 500) {
e.stopImmediatePropagation();
e.preventDefault();
return false;
}
@fronteer-kr
fronteer-kr / bootstrap-datepicker.js수정
Created December 24, 2014 04:00
bootstrap-datepicker 한글화
// 월-년 ==> 년-월 표시
fill() 함수 내 수정 (대략 738 line 부근)
// 수정전
this.picker.find('.datepicker-days thead th.datepicker-switch')
.text(dates[this.o.language].months[month]+' '+year);
// 수정후
this.picker.find('.datepicker-days thead th.datepicker-switch')