Skip to content

Instantly share code, notes, and snippets.

View sorie's full-sized avatar
💭
I may be slow to respond.

lala sorie

💭
I may be slow to respond.
  • Seoul or Jeju island
View GitHub Profile
@sorie
sorie / indexOne.html
Created June 3, 2015 05:22
indexOne.html
<!DOCTYPE html>
<html lang="ko-KR" class="no-js">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="UTF-8">
<title>타이틀</title>
<meta name="description" content="">
@sorie
sorie / styleOne.css
Created June 3, 2015 05:22
styleOne.css
@charset "utf-8";
/* 외부의 스타일 모듈 호출
* ---------------------------------------------------------------------------
*/
@import "./parts/normalize.min.css";
@import "./parts/common.css";
@import "./parts/gs.min.css";
@import "./parts/fonts.css";
[
// Sidebar Enhancement 기능 단축키 설정
{ "keys": ["ctrl+alt+n"] , "command": "side_bar_new_file" },
{ "keys": ["f2"] , "command": "side_bar_rename" },
{ "keys": ["ctrl+alt+m"] , "command": "side_bar_move" },
{ "keys": ["ctrl+alt+d"] , "command": "side_bar_delete" }
]
@sorie
sorie / ajax.html
Last active August 29, 2015 14:24
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/jquery-form.js"></script>
</head>
<body>
<form>
<input type="text" name="text2" /><br/>
@sorie
sorie / htmlBasic.html
Created August 6, 2015 02:41
html template
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
</head>
<body>
<script type="text/javascript">
@sorie
sorie / readFile.js
Last active March 12, 2020 12:42
node.js-FileSystem 모듈사용하여 파일 읽기
//Node.js - File System 모듈 호출
// 참고 URL: http://nodejs.org/api/fs.html
var fs = require('fs');
console.log('파일읽기프로세스시작...');
fs.readFile('files/user.json', function (err, data) {
var jsonobj = JSON.parse(data);
console.log('data:' + jsonobj.nickname);
});
console.log('파일읽기프로세스끝.');
@sorie
sorie / readFileSync.js
Created August 23, 2015 05:43
node.js - 동기화
var fs = require('fs');
console.log('파일 읽기 프로세스 시작...');
//file System - readFileSync() 사용
var data = fs.readFileSync('files/user.json');
console.log('데이터:' + data);
console.log('파일 읽기 프로세스끝.');
@sorie
sorie / writerFile.js
Last active August 29, 2015 14:27
nodejs-writeFile()메소드 사용하기.
var fs = require('fs');
console.log('문서쓰기프로세스시작...');
var cssDoc = '#nodejs {margin:0;}';
var options = {encoding: 'utf8'};
fs.writeFile(
'files/style.css',
cssDoc,
options,
function() {
@sorie
sorie / watchFile.js
Last active August 29, 2015 14:27
node.js - Using the watchFile() Method.
var fs = require('fs');
//style.css 문서경로
var styleDoc = 'files/style.css';
//watchFile() - 파일변화를 지속적으로 관찰함.
fs.watchFile(styleDoc , function(cur,prv){
//readFileSync() - 파일을 동기적으로 읽어옴.
var doc = fs.readFileSync(styleDoc);
console.log('변경된 문서내용: \n' + doc);
@sorie
sorie / combineJS.js
Last active August 29, 2015 14:28
node.js-외부모듈생성하기
/*! combineJS module @enne3939@gmail.com, 2015 */
// File System 내장 모듈 호출
var fs = require('fs');
minify = require('minify');
/**
* combine.JS 모듈 정의 및 외부로 출력
* 모듈 내부에 전달받을 인자(배열, 문자열) 설정\
*/