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 | |
$uploadUrl = 'http://test.com/upload.php'; | |
// 转发从其它客户端上传的文件,上传时字段name="file",但接收方字段name="attachment" | |
redirect_upload($uploadUrl, 'attachment', $_FILES['file']); | |
/* | |
* 转发上传文件 | |
*/ | |
function redirect_upload($url, $field = 'file', $file = null) |
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" | |
"reflect" | |
) | |
func Decorate(impl interface{}) interface{} { | |
fn := reflect.ValueOf(impl) |
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/bash | |
# Install parallel on CentOS 6. | |
# Assumes you are root. Prefix w/ sudo if not. | |
cd /etc/yum.repos.d/ | |
#wget http://download.opensuse.org/repositories/home:tange/CentOS_CentOS-5/home:tange.repo | |
wget http://download.opensuse.org/repositories/home:/tange/CentOS_CentOS-6/home:tange.repo | |
yum install parallel |