Fork me on GitHub
摘要: 4张表:filter nat mangle rawfilter:协议过滤;nat:地址转换,端口映射等;mangle:协议修改 TTL等;raw:Thistableisused mainly for configuring exemptions fromconnection tracking in ... 阅读全文
posted @ 2015-12-31 15:24 Mr.YF 阅读(1007) 评论(0) 推荐(0) 编辑
摘要: lua的库文件地址: http://luaforge.net/projects/lua官网 http://lua.org --[[ print string. multiple line comments. like {} in Tcl. ]]-- print ("hello") -- commen 阅读全文
posted @ 2015-12-23 18:54 Mr.YF 阅读(547) 评论(0) 推荐(0) 编辑
摘要: ==========================example for lua json=======================local cjson = require("cjson")local str = '["a", "b", "c"]'local j = cjson.decode... 阅读全文
posted @ 2015-12-23 18:49 Mr.YF 阅读(2222) 评论(0) 推荐(0) 编辑
摘要: Ajax是JQuery实现XMLHttpRequest的一种方式。增加HTML5按钮,含有点击事件:强制刷新增加JS Ajax调用:document.getElementById("reloadRuleBtn").onclick = function() { $.ajax({ type: "p... 阅读全文
posted @ 2015-12-23 18:36 Mr.YF 阅读(226) 评论(0) 推荐(0) 编辑
摘要: bootstrap使用modal-dialog实现弹对话框。一个对话框包含3部分:对话框头部modal-header对话框内容体modal-body对话框底部modal-footer如下html可以放入标签的任何位置,我习惯紧随标签之后。html代码片段: ... 阅读全文
posted @ 2015-12-23 18:21 Mr.YF 阅读(13515) 评论(0) 推荐(0) 编辑
摘要: nginx在配置文件nginx.conf中可以使用很多内置变量,配置如下: location /info { add_header 'Content-Type' 'text/html'; echo "http_user_agent :$http_user_agent <br>"; echo "htt 阅读全文
posted @ 2015-12-17 18:07 Mr.YF 阅读(3418) 评论(0) 推荐(2) 编辑
摘要: 来自几年前本人写的一篇博客 http://blog.csdn.net/newyf_cun/article/details/13016069 如下使用libtasn1分析asn1的编码规则。 http://www.linuxfromscratch.org/blfs/view/stable/genera 阅读全文
posted @ 2015-12-16 14:21 Mr.YF 阅读(1762) 评论(0) 推荐(0) 编辑
摘要: 工作中使用了一些数据库,将数据库的客户端封装成易用的c++类。 https://github.com/gityf/db 1. gdbm 一个比较早期的kv存储方案,key叫索引键,value数一条数据记录,一个表就是一个数据库文件,数据文件和内存映射,适合做配置记录. 如:QConf的使用 http 阅读全文
posted @ 2015-12-16 13:55 Mr.YF 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Tuxedo是Oracle的一个商业中间件,一般用于通信。 如下是一个简单的调用tuxedo的so动态库实现,编译后,tcl脚本可以加载并调用这个so库实现对tuxedo的调用。 1. 代码例子,保存文件为tuxedotcl.cc #include <stdio.h> #include <tcl.h 阅读全文
posted @ 2015-12-16 13:10 Mr.YF 阅读(496) 评论(0) 推荐(0) 编辑
摘要: package require "http" proc errLog args { puts $args } proc SendHttp args { global token set toUrl [lindex $args 0] if {[catch {set token [::http::get 阅读全文
posted @ 2015-12-15 15:28 Mr.YF 阅读(1204) 评论(0) 推荐(0) 编辑