Skip to content

Instantly share code, notes, and snippets.

View aguegu's full-sized avatar
🎯
Focusing

Weihong Guan aguegu

🎯
Focusing
View GitHub Profile
# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```
@aguegu
aguegu / conv.py
Created December 17, 2014 03:00
python script to batch converting from mkv to mp4
#!/usr/bin/env python
from subprocess import call
for i in range(4, 25):
call(["avconv", "-i", "DFTV.Ipartment.S03E%02d.720p.HDTV.x264-NGB.mkv" % i, "-acodec", "aac", "-strict", "experimental", "DFTV.Ipartment.S03E%02d.720p.HDTV.x264-NGB.mp4" % i])
@aguegu
aguegu / proxy_activate.sh
Created April 3, 2015 06:12
activate/deactivate terminal proxy
#!/bin/zsh
export {http,https,ftp}_proxy='http://localhost:7777'
@aguegu
aguegu / README.md
Created September 27, 2016 15:19 — forked from chuangbo/README.md
Python dynamic DNSPod DNS Script

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"

@aguegu
aguegu / ss2qrcode.py
Created March 18, 2017 14:51
Shadowsocks QRCode generation
import pyqrcode
import base64
url = 'bf-cfb-auth:[email protected]:8888'
print pyqrcode.create('ss://' + base64.b64encode(url)).terminal()
@aguegu
aguegu / feeder.js
Created December 13, 2018 08:21
csv.tar.gz generator
/* eslint-env mocha */
/* eslint no-console: 'off' */
import chai from 'chai';
import chaiHttp from 'chai-http';
import 'chai/register-should';
import { createObjectCsvWriter } from 'csv-writer';
import config from 'config';
import _ from 'lodash';
import moment from 'moment';
@aguegu
aguegu / wg0.conf
Last active October 24, 2022 08:35
PublicKey = wKjSrciKsI5/Cgw/7K+IQmizfSllc1fZ1lX9Cu8ByDw=
AllowedIPs = 10.0.0.6/32
PublicKey = 9kbLtWCwINyQgKX3kjSvHA4ez1nji0IjDNuAkTRnlAA=
AllowedIPs = 10.0.0.9/32