Skip to content

Instantly share code, notes, and snippets.

View coolicer's full-sized avatar
🎯
Focusing

e.e.p coolicer

🎯
Focusing
View GitHub Profile
@iest
iest / BzIframe.js
Created January 7, 2015 16:43
Basic react iframe with onLoad handler
'use strict';
var React = require('react');
var BzIframe = React.createClass({
propTypes: {
src: React.PropTypes.string.isRequired,
onLoad: React.PropTypes.func
},

测试平台: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     #编译所需要的软件
@olistik
olistik / gist:3894072
Created October 15, 2012 18:09
Ubuntu 12.04 Terminator config: solarized theme + iTerm2-like key bindings
# place this file in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
[keybindings]
reset_clear = <Ctrl>R
new_tab = <Ctrl>T
split_horiz = <Ctrl><Shift>E
split_vert = <Ctrl>E
close_term = <Ctrl><Shift>W
@max-te
max-te / youtube.js
Created September 17, 2012 15:56
Download Youtube-Video in node.js
var http = require('http')
var fs = require('fs')
var argv = require('optimist').argv
var rxVideoID = /v=([\]\[!"#$%'()*+,.\/:;<=>?@\^_`{|}~-\w]*)/
var link = argv._.toString()
var videoID = link.match(rxVideoID)[1]
http.get("http://www.youtube.com/get_video_info?video_id="+videoID, function(res) {
var chunks = []