This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authentication | |
users.host=192.81.133.165 | |
users.db_user=athurg | |
users.db_passwd=bZrYmtV7SzScJxe | |
users.database=athurg_wendangku | |
users.table=bs_user | |
users.user_column=email | |
users.password_column=passwd | |
users.password_crypt=1 | |
users.where_clause=expire_time>now() and email like '%@%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#由于采用用户名密码认证 | |
#所以服务器配置只需要通过 | |
# 1. source ./vars | |
# 2. `./build-ca` 生成CA根证书(服务器客户端一致) | |
# 3. `./build-key-server servername` 生成服务器证书对(cert/key) | |
# 4. `openvpn --genkey --secret ta.key` 生成TLS私钥(服务器客户端一直) | |
# 即可,无需生成客户端的cert证书和key私钥 | |
# 设置监听IP,默认是监听所有IP | |
local x.x.x.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"fmt" | |
"io/ioutil" | |
"bytes" | |
"encoding/binary" | |
"crypto/rsa" | |
"crypto/rand" | |
"crypto/x509" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strings" | |
"unicode/utf8" | |
) | |
func main() { | |
a := "中文A是不是很长啊对的很" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
掌上川电客户端 | |
@description 可以查询用户信息近期用电详情 | |
使用方式: | |
1. 先以`-listen port`参数启动本程序,建立一个HTTP代理服务器 | |
2. 设置手机使用这个代理服务器,并打开“掌上川电”客户端进行登陆 | |
3. 登陆成功后,本代理服务器会自动检测到会话编号并输出,此时可以关闭手机代理的设置 | |
4. 以`-sid 会话编号`为参数启动本程序,即可查询 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SECTION P# | |
#Item 1# | |
邮箱地址 (可选) | |
#Item 2# | |
域名列表 (仅当您没有CSR文件时输入) | |
#Item 3# | |
请粘贴您的Let's Encrypt key文件内容,或者留空由我们自动生成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Crypt3 | |
# | |
# A ruby version of crypt(3), a salted one-way hashing of a password. | |
# | |
# The Ruby version was written by Poul-Henning Kamp. | |
# | |
# Copyright (c) 2002 Poul-Henning Kamp | |
# | |
# Adapted by guillaume__dot__pierronnet_at__laposte__dot_net based on | |
# * http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/325204/index_txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
threads = [] | |
status=[] | |
30.times {|i| status[i]=false} | |
chars=['-', "\\", '|', '/', '-', "\\", '|', '/'] | |
puts '' | |
inprocess=true | |
threads << Thread.new do | |
while inprocess | |
chars.each do |char| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WXRDecoder | |
{ | |
protected $_parser; | |
protected $_ns; | |
public $posts=array(); | |
public $tags=array(); | |
public $post_table = 'tbl_posts'; |