Skip to content

Instantly share code, notes, and snippets.

View oxUnd's full-sized avatar
🔑
多写代码少说话

秋_ oxUnd

🔑
多写代码少说话
  • Harbin Institute of Technology
  • China
View GitHub Profile
@oxUnd
oxUnd / selection.html
Created November 2, 2014 00:41
simple editor
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>This is editor TEST</title>
<style type="text/css">
#editor {
margin: 10px 0;
border: 1px solid #CCCCCC;
width: 400px;
@oxUnd
oxUnd / g.html
Created July 21, 2014 07:32
用canvas做游戏,代码写得很直白。
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<canvas id="draw" width="400px" height="400px"></canvas>
<script type="text/javascript">
// shim layer with setTimeout fallback
@oxUnd
oxUnd / tcp_server.c
Last active August 29, 2015 14:03
TCP socket simple sample.
//
// main.c
// os_base_socket
//
// Created by xiangshouding on 14-7-13.
// Copyright (c) 2014 xiangshouding. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
@oxUnd
oxUnd / debug.c
Created July 13, 2014 00:08
debug.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <time.h>
int debug(const char *rule, ...) {
int ret;
char *buf;
@oxUnd
oxUnd / readable.js
Created July 9, 2014 00:37
readable.js
var _ = require('util');
var Readable = require('stream').Readable;
function MyReader (options) {
if (!(this instanceof MyReader)) {
return new MyReader(options);
}
Readable.call(this, options);
#!/usr/bin/env bash
find . -type d -depth 1 | grep -e '^./[^.].*' | awk '{
system("cd " $1 " && test -d .git && git pull origin master && cd -")
}'
@oxUnd
oxUnd / slide-sample.js
Created May 30, 2014 06:07
like `asyncMap`
var asyncMap = require('slide').asyncMap;
var http = require('http');
asyncMap(
[
"http://www.baidu.com",
"http://zhidao.baidu.com"
] ,
function (url, cb) {
@oxUnd
oxUnd / err.md
Created May 19, 2014 14:40
`go get github.com/mattn/go-sqlite3` get something error
➜  go-sqlite3 git:(master) ✗ go build -compiler gc
# github.com/mattn/go-sqlite3
gcc did not produce error at completed:1
on input:
#line 3 "/Users/shouding/dev/go/fis/src/github.com/mattn/go-sqlite3/sqlite3.go"
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
@oxUnd
oxUnd / FIS.md
Last active August 29, 2015 13:57

FIS vs FIS+

FIS和FIS+的争议诞生之初就开始了,用FIS的同学一上来就会问“FIS和FIS+有什么区别呀?”。鉴于此,大概说一下FIS及FIS+的历史及其区别。

FIS产生之初定位就是做一个内核,提供一套编译体系以及一套静态资源管理的设计思路及其本地调试。编译体系可以简单通过配置+插件的方式任意扩展。FIS+就通过扩展实现了一套适合于后端是PHP+Smarty3的编译体系,然后在后端实现了静态资源管理,提出了诸如quicklingi18nfis-plus(default)之类的解决方案。这块值得说明以下的是解决方案fis-plus其实它和编译体系的命令包取了相同的名字。下面详细说明编译体系、静态资源管理及本地调试。

编译体系

整个编译体系还有很大一块内容是目录规范,还有一块是以文件类型为基础的插件体系。

var Class = function (base, extend) {
var parent = null;
if (Object.prototype.toString.apply(base) == '[object Function]') {
parent = base;
} else {
extend = base;
}
var fn = function () {
this.initialize.apply(this, arguments);