Skip to content

Instantly share code, notes, and snippets.

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

秋_ oxUnd

🔑
多写代码少说话
  • Harbin Institute of Technology
  • China
View GitHub Profile
#!/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 / 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);
@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 / 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 / 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 / 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 / fis-server.md
Last active August 29, 2015 14:10
FIS-0

fis本地开发之本地server篇

诚然,为了开发的便利高效,不得不用并行开发的方式--后端开发和前端开发并行开发,这时候问题就来了。对于一个同样的项目,并行开发如何拆分比较容易实现并达到真正的高效,我们在此处选择了以模板为分界点,数据为桥的开发方式。

前端开发人员负责模板及其周边的静态资源的开发工作,而后端和前端逻辑用数据作为桥梁进行串接,在这样一种开发模式下开发起初只需要制定好数据规则就可以愉快的进行开发了。

在前端这块,为了能畅通的使用这些数据进行开发,不得不进行本地模拟线上环境,使用模拟数据进行渲染,而恰巧需要一个便捷的本地server来充当服务器的角色。这篇讲述一下这个server的方方面面。

server呢可以选择比较时髦的nginxlighttpdapache等,当然fis已经集成了若干解析后端脚本的服务。

@oxUnd
oxUnd / FIS-PLUS-0.md
Last active August 29, 2015 14:10
fis-plus上线篇之搞定smarty环境

fis-plus上线篇之搞定smarty环境

在使用fisp(fis-plus简称)的时候,有些文件看着就是碍眼,有些文件想release到看上去比较顺眼的地方,或者是其他一些看似合乎逻辑的理由想改路径。反正就一个事儿,想更改发布路径。

把想更改发布路径深深的埋藏在心里,苦苦不知道从何下手。翻翻文档吧,都能丢失在文档的海洋里面,心里暗骂“艹,上午的需求还没有完成呢!!!”,无奈心里还是痒痒,想改路径。

我真实的描述了一个拿到fisp想改改路径却没改成功的心情。本篇就是彻底把这坨事情描述明白而生的,另外只此一次过时不候。

Smarty使用介绍

@oxUnd
oxUnd / cal.go
Last active September 24, 2020 10:44
Tiny calculator use golang
//
// Tiny calculator
//
// cal := modules.NewCal()
// fmt.Println(cal.MustCal("1x1+4/2x(1+2)"))
// result, err := cal.Cal("1x1+4/2x(1+2)")
// fmt.Println(cal.GetPostfixExpr("1x1+4/2x(1+2)"))
//
package modules
@oxUnd
oxUnd / fis-conf.js
Last active May 3, 2016 03:29
fis3
fis.set('namespace', 'common');
//-- system settings
fis.set('server', {
'libs': 'pc',
});
fis.set('plugin less', {