Skip to content

Instantly share code, notes, and snippets.

@duyamin
duyamin / getAlbumCover.py
Created December 31, 2011 01:45 — forked from sandin/getAlbumCover.py
download album cover
#!/usr/bin/env python
# -*- coding: utf8 -*-
#
# = Requirements =
# eyed3 [http://eyed3.nicfit.net/]
# BeautifulSoup [http://www.crummy.com/software/BeautifulSoup/]
#
# = 使用方法 =
# 将该脚本放置音乐文件夹下,运行 python getAlbumCover.py
@duyamin
duyamin / getAlbumCover.py
Created December 31, 2011 01:45 — forked from sandin/getAlbumCover.py
download album cover
#!/usr/bin/env python
# -*- coding: utf8 -*-
#
# = Requirements =
# eyed3 [http://eyed3.nicfit.net/]
# BeautifulSoup [http://www.crummy.com/software/BeautifulSoup/]
#
# = 使用方法 =
# 将该脚本放置音乐文件夹下,运行 python getAlbumCover.py
@duyamin
duyamin / gist:3834730
Created October 4, 2012 16:23 — forked from observerss/gist:3798896
Google Keyword Tool Scraper(selenium+python version)
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
import selenium.webdriver.support.wait
selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05
import re
import random
import collections
class AdwordsAutomater(object):
@duyamin
duyamin / gist:3834755
Created October 4, 2012 16:26 — forked from observerss/gist:3798922
Google Keyword Tool Scraper(casperjs version)
// requires
var utils = require('utils');
var casper = require('casper').create()
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
// setup globals
var email = casper.cli.options['email'] || 'REPLACE THIS EMAIL';
@duyamin
duyamin / xx.py
Last active August 29, 2015 14:16 — forked from anonymous/xx.py
import requests
import lxml.html
page = requests.get('http://tieba.baidu.com/p/2166231880').text
doc = lxml.html.document_fromstring(page)
for idx, el in enumerate(doc.cssselect('img.BDE_Image')):
with open('%03d.jpg' % idx, 'wb') as f:
f.write(requests.get(el.attrib['src']).content)

平台: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     #编译所需要的软件
@duyamin
duyamin / README.md
Created November 10, 2017 14:35 — forked from mariotaku/README.md
Followers Cleaner Script

Usage

  1. Execute pip3 install -r requirements.txt to install dependencies
  2. Execute followers_clear.py and follow instructions.

Notes

Consumer keys can be found here. Use these keys instead of applying yourself can get rid of rate limit.

@duyamin
duyamin / modern_crypto.md
Created December 15, 2017 02:45 — forked from byronhe/modern_crypto.md
现代密码学实践指南[2015年]

现代密码学实践指南[2015年]

标签(空格分隔): 密码学


本文介绍目前现代密码学的最先进技术, 前半部分主要翻译自 《Cryptographic Right Answers》,附上收集的资料,和byron个人的理解。

@duyamin
duyamin / config.json
Created March 19, 2018 08:57 — forked from wd/config.json
路由器梅林固件上面使用 v2ray 的方案
{
"log": {
"loglevel": "none"
},
"inbound": {
"port": 23456,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true