Skip to content

Instantly share code, notes, and snippets.

View LuoZijun's full-sized avatar
🎯
Focusing

寧靜 LuoZijun

🎯
Focusing
View GitHub Profile
@LuoZijun
LuoZijun / vpnsetup.sh
Last active August 29, 2015 14:06 — forked from hwdsl2/.MOVED.md
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN
# on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise).
# With minor modifications, this script *can also be used* on dedicated servers
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers.
#
# For detailed instructions, please see:
# https://blog.ls20.com/ipsec-l2tp-vpn-auto-setup-for-ubuntu-12-04-on-amazon-ec2/
# Original post by Thomas Sarlandie:
#!/usr/bin/env nodejs
// -*- mode: js -*-
/*
NodeJS:
WEB: https://nodejs.org/
Package: https://www.npmjs.com/
*/
#!/usr/bin/env fibjs
// -*- mode: js -*-
/*
Fibjs:
web: http://fibjs.org/
Package: http://fpmjs.org/
Install:
1. $ npm install fibjs
@LuoZijun
LuoZijun / test.html
Last active August 29, 2015 14:26
读取 二进制文件
<html>
<head>
<script type="text/javascript">
// 使用方法:
// 页面加载完毕后,打开 浏览器控制台,调用函数 `get_file_content()` 即可以看到数据。
function chr (code){
return String.fromCharCode(parseInt(code));
}
function ord(s){
return s.charCodeAt(0);
@LuoZijun
LuoZijun / README.rst
Last active February 17, 2016 16:08
JSX Parse

JSX 字符串提取

代码依赖 Node.js 运行环境以及 Python 运行环境。

下面将安装 Node.js 和 Python 运行时:

@LuoZijun
LuoZijun / README.rst
Last active March 12, 2016 00:08
Go-Sqlite3
Version

0.2

image

使用

程序改为了 命令行调用模式。

@LuoZijun
LuoZijun / README.rst
Last active July 3, 2016 15:13
[爱,方式,包容,创意 —— 在微软设计] 下载
Date

07/03 2016

Source

daxue.qq.com/content/content/id/2578

@LuoZijun
LuoZijun / isPrime.js
Last active August 30, 2016 04:09
JavaScript 寻找素数
"use strict";
function primes_with_generator(start, max){
// start: int ( start >= 2 )
// max : int
if ( start < 2 ) throw new Error("start > 2 | start == 2");
var generator = function* (start, max){
var n = start || 2;
while ( n <= max ){
yield n++;
@LuoZijun
LuoZijun / readme.rst
Created September 7, 2016 00:26
Node JavaScript File I/O

NodeJS 解释器文件I/O (FILE I/O)

Date

09/07 2016

介绍

@LuoZijun
LuoZijun / README.rst
Last active October 20, 2016 07:01
MongoDB Auto-Incrementing Sequence Test