Skip to content

Instantly share code, notes, and snippets.

@mpco
mpco / gencert.sh
Created March 13, 2015 13:48
生成服务器证书?Maybe
#!/bin/sh
# create self-signed server certificate:
read -p "Enter your domain [www.example.com]: " DOMAIN
echo "Create server key..."
openssl genrsa -des3 -out $DOMAIN.key 1024
#!/usr/bin/env python
# coding=utf8
# author=evi1m0
# website=linux.im
'''
12306 Captcha Picture:
author: Evi1m0@20150316
1. Download Captcha
2. Pic Conver Text
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
__author__ = 'm'
__time__ = '15-4-20'
网络限制,未测试
"""
import os
import re
import wave
@mpco
mpco / README.md
Last active December 26, 2021 04:09
使用Aria2下载喜马拉雅的专辑

使用方法:

python XmlyDownloadByAria2.py http://www.ximalaya.com/19539305/album/3635803 

原理:

喜马拉雅的专辑页面中,存在如下结构:

@mpco
mpco / TransferFileByLAN.py
Last active May 27, 2017 19:21
利用Python建立本地服务器,二维码展示想要传输的文件网址,传输完成后自动关闭服务器,并删除二维码。
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# python 2.7
# request: `brew install qrencode`
# OS: macOS because using Applescript.
"""
Author: Mr.pc
Date: 20170528
Version: 1.1
Description:
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import urllib.request
import json
import time
import sys
import os
# https://m.okjike.com/topics/5575a562e4b06db055be5425?username=DB5A4902-B148-448A-8F05-5A94AC27D171
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from urllib import request
from bs4 import BeautifulSoup
import re
import time
@mpco
mpco / 英语阅读.js
Created January 13, 2019 13:11
英语阅读-JSBox
// $objc("UIReferenceLibraryViewController").invoke("dictionaryHasDefinitionForTerm:", "book");
// let refVC = $objc("UIReferenceLibraryViewController").invoke("alloc").invoke("initWithTerm:", "book");
// let rootVC = $ui.controller.runtimeValue();
// rootVC.$presentViewController_animated_completion(refVC, true, null);
// $text.lookup("text");
if ($app.env == $env.action) {
var baseURI = $context.link
// $ui.alert(baseURI);