Skip to content

Instantly share code, notes, and snippets.

代码家 daimajia

Block or report user

Report or block daimajia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View linux上用strongswan搭建ikev2协议vpn.md

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
View Node
// http://www.v2ex.com/t/139818#reply90
var start = Date.now();
var sum = 0;
for(var i = 0; i <= 1000000000; ++i){
sum += i;
}
var end = Date.now();
var span = end - start;
console.log(span / 1000 + " seconds");
View Binary Tree Zigzag Level Order Traversal -- LeetCode
public class Solution {
private Map<Integer, ArrayList<Integer>> maps = new TreeMap<Integer, ArrayList<Integer>>();
public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
zigzag(root, 0);
return new ArrayList<List<Integer>>(maps.values());
}
public void zigzag(TreeNode node, int level){
@daimajia
daimajia / appjs-express-jade-example.js
Last active Dec 18, 2015
nodejs / appjs / express / jade example
View appjs-express-jade-example.js
/*
author: daimajia
name: appjs Express example
email: daimajia@gmail.com
any question feel free to email me :)
*/
View useful-css-snippets.css
/*
*reset css
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
View awesome-php.md

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

View awesome-php.md

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should be using:

You can’t perform that action at this time.