This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// http://faultnote.tistory.com/337 | |
// | |
var util = require('util'); | |
var request = require('request'); | |
var fs = require('fs'); | |
var token = /asset|boheom|bohum|inus|life|ins|direct|inr|inz|youngm|jongsin/i; | |
var url = 'http://www.rankey.com/rank/ajax/ajax_rank_site_cate.php'; // ref. http://www.rankey.com/rank/rank_site_cate.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// combine keyword | |
var fs = require('fs'); | |
fs.readFileSync('1.txt').toString().split('\n').forEach(function(line) { | |
var token = line; | |
fs.readFileSync('2.txt').toString().split('\n').forEach(function(line) { | |
var make = token.trim() + ' ' + line.trim(); | |
console.log(make); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
checkout this | |
http://paularmstrong.github.io/swig/docs/#filters-custom | |
setup like below | |
// set template engine | |
var swig = require('swig'); | |
var swigFilter = require('./swigFilter'); | |
var swigTag = require('./swigTag'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
checkout this | |
http://paularmstrong.github.io/swig/docs/#tags-custom | |
setup like below | |
// set template engine | |
var swig = require('swig'); | |
var swigFilter = require('./swigFilter'); | |
var swigTag = require('./swigTag'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// async 모듈 사용시 형태 | |
exports.getList = function (req, res) { | |
async.parallel([ | |
// 메소드 1 | |
// 메소드 2 | |
// 메소드 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_intercept_errors on; | |
proxy_pass http://127.0.0.1:3001; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul { list-style-type: none; margin-top: 1.5em; } | |
hr.space { background: transparent; border: transparent; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- this version of sample is too old. it's not follow recent version of summernote api --> | |
<!-- should check new apis and examples! sorry I am. --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<!-- include libries(jQuery, bootstrap, fontawesome) --> | |
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.no-icons.min.css" rel="stylesheet"> | |
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// original code from https://github.com/guersam/freezhal/blob/master/lib/utils.coffee#L91-L94 | |
// | |
// from utility.js | |
var Iconv = require('iconv').Iconv; | |
var toUTF8 = new Iconv('EUC-KR', 'UTF-8'); | |
exports.decodeEuckrUrlToUTF8 = function(str) { | |
var toHex = function(n) { | |
return parseInt('0x' + n); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var util = require('util'); | |
var full = fs.readFileSync('full.txt',{ encoding:"utf-8"}).toString().split('\n'); | |
var ext = fs.readFileSync('ext.txt',{ encoding:"utf-8"}).toString().split('\n'); | |
String.prototype.trim = function() { | |
return this.replace(/(^\s*)|(\s*$)/gi, ""); | |
}; |
OlderNewer