Skip to content

Instantly share code, notes, and snippets.

View wongsyrone's full-sized avatar

Syrone Wong wongsyrone

View GitHub Profile

平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2 运行以下命令请使用root权限



apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
wongsyrone / origin-c-sharp.cs
Last active August 29, 2015 14:14
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 /
Last active August 29, 2015 14:15 — forked from vodik/

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 /
Last active August 29, 2015 14:16


  • 缘之空 已下载
  • 化物语
  • 冰果 已下载
  • 夏目友人帐
  • 摇曳百合 第一季正在下载
  • 机巧少女不会受伤 已下载
  • 我要成为双马尾
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 /
Created January 11, 2016 00:39 — forked from klzgrad/






wongsyrone / gist:49b5b21f4a7d0d59ba7e
Created March 20, 2016 07:57
openwrt projects cross ref
wongsyrone / gist:ed5f5a8326edb288ebac
Created March 29, 2016 09:13 — forked from paulirish/gist:4158604
Learn JavaScript concepts with recent DevTools features

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.


Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:

wongsyrone /
Created April 7, 2016 08:55 — forked from chrisroos/
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

wongsyrone /
Created April 7, 2016 08:57 — forked from bnagy/
Mutt, Gmail and GPG

GPG / Mutt / Gmail


This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service