<?php
$priKey = file_get_contents('./id_rsa');
$res = openssl_get_privatekey($priKey);
$orderString = 'some string';
openssl_sign($orderString, $sign, $res);
//$sign为引用
openssl_free_key($res);
$sign = base64_encode($sign);
echo $sign;
var proxy = "SOCKS5 127.0.0.1:1081; SOCKS 127.0.0.1:1081; DIRECT;"; | |
var direct = 'DIRECT;'; | |
var domains = [ | |
'twitter.com', | |
'google.com', | |
'google.com.hk', | |
't.co', | |
'twimg.com', | |
'github.com', |
#一键从备份恢复数据 | |
HOST=192.168.1.158 #主机地址,最好写好证书 | |
BACKUP_DIR=/data/autobackup/mysql #远程备份文件夹地址 | |
DB=jjdd #数据库名 | |
MYSQL_DATA_DIR=/usr/local/mysql/data/ #本机数据库 datadir | |
MYSQL_USER=_mysql:_mysql #mysql 的用户 | |
#start... | |
sudo echo '已获得 root 权限' | |
if [ $? -ne 0 ] ; then |
nodemailer = require "nodemailer" | |
transportOptions = | |
service: "QQ" | |
auth: | |
user: "example@qq.com" | |
pass: "password" | |
mailOptions = | |
from: "example@qq.com", | |
to: "xxx@qq.com", |
request = require 'request' | |
form = | |
from: 'shiguanglu <sys@shiguanglu.com>' | |
to: 'testuser <ice.shiny@gmail.com>' | |
subject: 'this is a test mail' | |
text: 'test mail body' | |
auth = | |
user: 'api' | |
password: 'YOUR API KEY FROM MAILGUN' | |
<?php | |
/** | |
* 将数字转为短网址代码 | |
* | |
* @param int $number 数字 | |
* @return string 短网址代码 | |
*/ | |
function generate_code($number) { | |
$out = ""; | |
$codes = "abcdefghjkmnpqrstuvwxyz23456789ABCDEFGHJKMNPQRSTUVWXYZ"; |
import math | |
import decimal | |
def convert_to_code(num): | |
""" | |
将数字转换为代码 | |
""" | |
def get_num(num, out=''): | |
num = decimal.Decimal(num) | |
codes = "abcdefghjkmnpqrstuvwxyz23456789ABCDEFGHJKMNPQRSTUVWXYZ" |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>OnDemand</key> | |
<false/> | |
<key>Label</key> | |
<string>com.me.shadowsocks.startup</string> |
import requests | |
import re | |
def fetch_jd_price(id): | |
s = requests.Session() | |
buy_url = 'http://gate.360buy.com/InitCart.aspx?pid='+str(id)+'&pcount=1&ptype=1' | |
status_url = 'http://cart.360buy.com/cart/miniCartServiceNew.action?'+\ | |
'callback=jsonp&_=1358748376993&method=GetCart' | |
s.get(buy_url) | |
r = s.get(status_url) |
Benchmark Run: Sun Dec 30 2012 21:57:45 - 22:26:22 | |
2 CPUs in system; running 2 parallel copies of tests | |
Dhrystone 2 using register variables 26176109.2 lps (10.0 s, 7 samples) | |
Double-Precision Whetstone 5340.4 MWIPS (9.9 s, 7 samples) | |
Execl Throughput 7423.6 lps (29.7 s, 2 samples) | |
File Copy 1024 bufsize 2000 maxblocks 124316.5 KBps (30.0 s, 2 samples) | |
File Copy 256 bufsize 500 maxblocks 32652.9 KBps (30.0 s, 2 samples) | |
File Copy 4096 bufsize 8000 maxblocks 275769.1 KBps (30.0 s, 2 samples) | |
Pipe Throughput 2025220.5 lps (10.0 s, 7 samples) |