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
$ host a.alipayobjects.com 8.8.8.8 | |
Using domain server: | |
Name: 8.8.8.8 | |
Address: 8.8.8.8#53 | |
Aliases: | |
Host a.alipayobjects.com not found: 5(REFUSED) | |
$ host a.alipayobjects.com 8.8.4.4 | |
Using domain server: | |
Name: 8.8.4.4 |
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
$ curl -v http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable | |
* About to connect() to rails-bestpractices.com port 80 (#0) | |
* Trying 74.207.244.80... | |
^C | |
$ tsocks curl -v http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable | |
* About to connect() to rails-bestpractices.com port 80 (#0) | |
* Trying 74.207.244.80... | |
* connected | |
* Connected to rails-bestpractices.com (74.207.244.80) port 80 (#0) | |
> GET /posts/27-replace-instance-variable-with-local-variable HTTP/1.1 |
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
#define a(k) printf("k") | |
int main() { | |
a(hello); | |
} |
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
$ bundle exec bin/backup2qiniu gen_token | |
input your keys (you can find them on https://dev.qiniutek.com/account/keys) | |
Access Key: 1PpS-UnbKewFTut4qBETq5kbq9Z1MtkLPTMANJ6h | |
Secret Key: ******* | |
Your buckets: paperclip-qiniu-example, backup2 | |
Select Bucket: backup2 | |
Token Valid Days (365): | |
Params | |
access_key: 1PpS-UnbKewFTut4qBETq5kbq9Z1MtkLPTMANJ6h |
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
$ ping mail.qq.com | |
PING mail.qq.com (14.17.19.167): 56 data bytes | |
64 bytes from 14.17.19.167: icmp_seq=0 ttl=51 time=34.707 ms | |
64 bytes from 14.17.19.167: icmp_seq=1 ttl=51 time=53.788 ms | |
^C | |
--- mail.qq.com ping statistics --- | |
2 packets transmitted, 2 packets received, 0.0% packet loss | |
round-trip min/avg/max/stddev = 34.707/44.248/53.788/9.540 ms | |
$ echo | openssl s_client -connect mail.qq.com:443 2>&1 | |
CONNECTED(00000003) |
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
$ dig mail.qq.com | |
; <<>> DiG 9.8.3-P1 <<>> mail.qq.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49683 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;mail.qq.com. IN 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
$ echo | openssl s_client -connect login.live.com:443 2>&1 | |
CONNECTED(00000003) | |
depth=0 /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Washington/businessCategory=Private Organization/serialNumber=600413485/C=US/postalCode=98052/ST=Washington/L=Redmond/street=1 Microsoft Way/O=Microsoft Corporation/OU=Passport/CN=login.live.com | |
verify error:num=20:unable to get local issuer certificate | |
verify return:1 | |
depth=0 /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Washington/businessCategory=Private Organization/serialNumber=600413485/C=US/postalCode=98052/ST=Washington/L=Redmond/street=1 Microsoft Way/O=Microsoft Corporation/OU=Passport/CN=login.live.com | |
verify error:num=27:certificate not trusted | |
verify return:1 | |
depth=0 /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Washington/businessCategory=Private Organization/serialNumber=600413485/C=US/postalCode=98052/ST=Washington/L=Redmond/street=1 Microsoft Way/O=Microsoft Corporation/OU=Passport/CN=login.live.com | |
verify error:num=21:unable to verify t |
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
$ echo | openssl s_client -connect mail.google.com:443 2>&1 | |
CONNECTED(00000003) | |
=depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=mail.google.com | |
verify error:num=20:unable to get local issuer certificate | |
verify return:1 | |
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=mail.google.com | |
verify error:num=27:certificate not trusted | |
verify return:1 | |
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=mail.google.com | |
verify error:num=21:unable to verify the first certificate |
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" | |
) | |
type A struct { | |
I int | |
} |
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" | |
"os" | |
) | |
import ( | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" |