Skip to content

Instantly share code, notes, and snippets.

View barretlee's full-sized avatar
💭
Make things happen!

Barret李靖 barretlee

💭
Make things happen!
View GitHub Profile

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
@barretlee
barretlee / index.html
Created November 11, 2014 14:14
Move Obj Demo // source http://jsbin.com/canizo/1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Move Obj Demo</title>
<style id="jsbin-css">
html, body {
height: 100%;
overflow: hidden;
}
@barretlee
barretlee / gulpfile.js
Created March 25, 2015 07:12
gulpfile test
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var minicss = require('gulp-minify-css');
var rename = require("gulp-rename");
var del = require('del');
gulp.task('clean', function(cb) {
del(['build'], cb);
});
@barretlee
barretlee / package.json
Created March 25, 2015 07:13
package for gulpfile
{
"name": "conve",
"author": "Barret Lee",
"version": "0.0.1",
"description": "",
"scripts": {},
"license": "MIT",
"devDependencies": {
"gulp": "~3.8.6",
"gulp-uglify": "0.2.1",
@barretlee
barretlee / .gitignore
Created March 25, 2015 07:13
normal gitignore file
tmp
*.log
node_modules
bower_components
.idea/*
lib
{
// 主题,可以安装 themr 来管理主题
"theme": "Flatland Dark.sublime-theme",
// 设置为false时,选择提示的代码按回车或点击可以输出出来,但选择true时不会输出而是直接换行
"auto_complete_commit_on_tab": false,
// 设置为true时在当前可视文本视图相应的minimap区域的周围画边框
"draw_minimap_border": true,
// 光标淡入淡出
"caret_style": "phase",
// 设置为all时所有空格可视,便于区分页面中的空格和TAB。
@barretlee
barretlee / sendNewPostToBaidu.js
Created September 2, 2015 05:29
send new post to baidu
var fs = require('fs');
var path = require('path');
var exec = require("child_process").exec;
var root = '../build/';
var writeFilePath = './urls.txt';
var historyFilePath = './history.txt';
var history = [];
var suffix = "http://www.barretlee.com/";
var pushQueue = [];
var count = 0;
.PHONY: r d b h n i c run backup deploy help new mkfile init clear goroot
ROOT = ~/work/blogsys/
DRAFTS = ${ROOT}blog/src/_drafts/
POSTS = ${ROOT}blog/src/_posts/
BACKUPPOSTS = ${ROOT}blogsources/backup/posts/
BACKUPDRAFTS = ${ROOT}blogsources/backup/drafts/
BACKUPPOSTS_BAC = ${ROOT}databackup/posts/
BACKUPDRAFTS_BAC = ${ROOT}databackup/drafts/
@barretlee
barretlee / mongo.js
Created October 26, 2015 12:15
mongo
var MongoClient = require('mongodb').MongoClient;
var mg = require('../config').mongodb;
var DB = function(){
this.url = "mongodb://" + mg['host'] + ":" + mg['port'] + "/" + mg['database'];
};
module.exports = new DB;
DB.prototype.connect = function(cb){