Skip to content

Instantly share code, notes, and snippets.

View wongsyrone's full-sized avatar
😂
Babysitting

Syrone Wong wongsyrone

😂
Babysitting
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     #编译所需要的软件
@wongsyrone
wongsyrone / origin-c-sharp.cs
Last active August 29, 2015 14:14
计算四班三运转(C-sharp2JavaScript)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Common
{
public static class GetShift
{
public static string Shift(string input_date)
@wongsyrone
wongsyrone / SOS.md
Last active August 29, 2015 14:15 — forked from vodik/SOS.md

Once upon a time there was a user that wanted to install firefox.

The user tried to do pacman -S firefox but it didn't work. The all mighty pacman reported that firefox-3.2.4-1.i686.pkg.tar.gz could not be found on his mirror. So the user tried pacman -Sy firefox. It worked and the user rejoiced since he could once again go and troll /h/.

But all was not good. The user had made a grave error!

See, when the user told the almighty pacman to -Sy firefox, pacman did

@wongsyrone
wongsyrone / List.md
Last active August 29, 2015 14:16
追/补番列表

旧番或新番

  • 缘之空 已下载
  • 化物语
  • CLANNED
  • 冰果 已下载
  • 夏目友人帐
  • 摇曳百合 第一季正在下载
  • 机巧少女不会受伤 已下载
  • 我要成为双马尾
@wongsyrone
wongsyrone / gist:6cd295e1ed471173cbfe
Last active April 18, 2018 14:45
systemd ss-libev
/usr/lib/systemd/system/shadowsocks-server@.service
[Unit]
Description=Shadowsocks libev Server Service
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/ss-server -u -v -A --fast-open -c /etc/shadowsocks/%i.json --acl /etc/shadowsocks/local.acl
@wongsyrone
wongsyrone / ocserv.conf
Last active October 31, 2022 22:28 — forked from tinkernels/ocserv.conf
ocserv configuration file example.
# User authentication method. Could be set multiple times and in
# that case all should succeed. To enable multiple methods use
# multiple auth directives. Available options: certificate, certificate[optional],
# plain, pam.
#auth = "certificate"
#auth = "plain[./ocserv-passwd]"
#auth = "pam"
# This indicates that a user may present a certificate. When that option
# is set, individual users or user groups can be forced to present a valid
@wongsyrone
wongsyrone / gist:03ca9b90a1fe8ef09765
Created September 10, 2015 13:01
create pem files
Creating a .pem with the Entire SSL Certificate Trust Chain
Log into your DigiCert Management Console and download your Intermediate (DigiCertCA.crt), Root (TrustedRoot.crt), and Primary Certificates (your_domain_name.crt).
Open a text editor (such as wordpad) and paste the entire body of each certificate into one text file in the following order:
The Primary Certificate - your_domain_name.crt
The Intermediate Certificate - DigiCertCA.crt
The Root Certificate - TrustedRoot.crt
Make sure to include the beginning and end tags on each certificate. The result should look like this:
@wongsyrone
wongsyrone / merge-cidr.pl
Created September 12, 2015 10:02
merge-cidr.pl
#!/usr/bin/perl
## ArchLinux install package via pacman: perl-net-cidr-lite
use strict;
use warnings;
use Net::CIDR::Lite;
my $cidr = Net::CIDR::Lite->new;
while (my $line=<>) {
$cidr->add($line);
}
foreach my $line( @{$cidr->list} ) {
adb shell "settings put global captive_portal_server g.cn"
v2ex 不好用了
by lkebin: liukebin.avosapps.com 架设于LeanCloud服务器,据lkebin称是永久有效
by Zohar: www.iwch.me 热心网友的个人站点
@wongsyrone
wongsyrone / 010-c301-complete-support.patch
Created November 20, 2015 01:20
Qihoo C301 OP patch
From 7f0f570213b7056a28d7d352ac1666e0937ffa4b Mon Sep 17 00:00:00 2001
From: Weijie Gao <hackpascal@gmail.com>
Date: Wed, 24 Sep 2014 01:13:34 +0800
Subject: [PATCH] complete c301 support
---
package/boot/uboot-envtools/files/ar71xx | 6 +++
package/network/utils/iwinfo/src/iwinfo_lua.c | 3 ++
target/linux/ar71xx/base-files/etc/diag.sh | 8 ++++
.../lib/preinit/81_load_ath10k_board_bin | 7 +++-