Skip to content

Instantly share code, notes, and snippets.

View weiofcn's full-sized avatar

Zhou Wei weiofcn

View GitHub Profile

测试平台: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     #编译所需要的软件
@weiofcn
weiofcn / trial.key
Created July 13, 2017 09:31 — forked from huqi/trial.key
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@weiofcn
weiofcn / git_toturial
Created July 13, 2017 09:32 — forked from huqi/git_toturial
git toturial
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
## Server side
```
npm -g install jmate
```
## Local & VSCode
1. Install openssh: http://www.mls-software.com/opensshd.html
package main
import (
"fmt"
)
type I interface {
M() string
}
package main
import (
"fmt"
)
type I1 interface {
M1()
}
package main
import (
"fmt"
)
type I interface {
M()
}
@weiofcn
weiofcn / mongo-c-driver-for-ios.md
Last active December 19, 2017 09:16
如何编译在iOS上可以使用的mongo-c-driver

下载openssl

https://github.com/x2on/OpenSSL-for-iPhone

下载mongodb-c-driver

http://mongoc.org/#download

编译mongodb-c-driver

./configure --disable-automatic-init-and-cleanup CC="/Applications/Xcode7.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" LDFLAGS="-L/Users/XXX/OpenSSL-for-iPhone/lib" CPPFLAGS="-I/Users/XXX/OpenSSL-for-iPhone/include" CFLAGS="-isysroot /Applications/Xcode7.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -arch arm64" --enable-static --with-zlib=bundled --with-libbson=bundled --host=armv7-apple-darwin --enable-ssl=openssl
@weiofcn
weiofcn / smb.conf
Last active December 19, 2017 07:41
精简版smb配置文件
# smbpasswd -a wei
[global]
workgroup = WORKGROUP
netbios name = Ubuntu
server string = Ubuntu
security = user
[wei]
comment = wei
@weiofcn
weiofcn / REDIS-MONGODB-MARIADB-INSTALL.MD
Last active January 11, 2018 03:32
安装REDIS、MONGODB和MARIADB服务端和C/C++下面的开发环境

安装REDIS、MONGODB和MARIADB服务端和C/C++下面的开发环境

REDIS

  1. 服务端安装:apt install redis-server
  2. 下载C/C++开发库:https://github.com/redis/hiredis/releases
  3. 编译C/C++开发库:make && make install
  4. 编译运用程序:gcc -o example example.c $(pkg-config --libs --cflags hiredis)

MONGODB