Skip to content

Instantly share code, notes, and snippets.

View gslin's full-sized avatar

Gea-Suan Lin gslin

View GitHub Profile
gslin@GSLIN-DESKTOP [~] [23:18/W3] curl -I -v http://www.logdown.com/
* About to connect() to www.logdown.com port 80 (#0)
* Trying 106.186.25.116... connected
> HEAD / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: www.logdown.com
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
gslin@gslin-desktop [~] [18:23/W2] curl -IL http://24h.pchome.com.tw/BEAD62-A44512396
HTTP/1.1 302 Found
Date: Wed, 11 Sep 2013 10:23:39 GMT
Server: PChome/1.0.0
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Wed, 11 Sep 2013 10:23:39 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
block: xP
public function addConnection(array $config, $name = 'default')
{
$connections = $this->container['config']['database.connections'];
$connections[$name] = $config;
$this->container['config']['database.connections'] = $connections;
}
gslin@Gea-Suanteki-MacBook-Air [~] [10:45/W2] ping -c 10 168.95.1.1
PING 168.95.1.1 (168.95.1.1): 56 data bytes
64 bytes from 168.95.1.1: icmp_seq=0 ttl=245 time=456.393 ms
64 bytes from 168.95.1.1: icmp_seq=1 ttl=245 time=138.743 ms
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
64 bytes from 168.95.1.1: icmp_seq=4 ttl=245 time=12.190 ms
64 bytes from 168.95.1.1: icmp_seq=5 ttl=245 time=52.431 ms
64 bytes from 168.95.1.1: icmp_seq=6 ttl=245 time=10.632 ms
64 bytes from 168.95.1.1: icmp_seq=7 ttl=245 time=3.097 ms
@gslin
gslin / quote.php
Created January 15, 2014 08:18
Quote...
#!/usr/bin/env php
<?php
echo "\\\"\'", "\n";
echo '\\\"\'', "\n";
# lt_LT.UTF-8 lv_LV.ISO8859-13 lv_LV.UTF-8 mn_MN.UTF-8
# nb_NO.ISO8859-1 nb_NO.ISO8859-15 nb_NO.UTF-8 nl_BE.ISO8859-1
# nl_BE.ISO8859-15 nl_BE.UTF-8 nl_NL.ISO8859-1 nl_NL.ISO8859-15
# nl_NL.UTF-8 nn_NO.ISO8859-1 nn_NO.ISO8859-15 nn_NO.UTF-8
# no_NO.ISO8859-1 no_NO.ISO8859-15 no_NO.UTF-8 pl_PL.ISO8859-2
# pl_PL.UTF-8 pt_BR.ISO8859-1 pt_BR.UTF-8 pt_PT.ISO8859-1
# pt_PT.ISO8859-15 pt_PT.UTF-8 ro_RO.ISO8859-2 ro_RO.UTF-8
# ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.KOI8-R
# ru_RU.UTF-8 sk_SK.ISO8859-2 sk_SK.UTF-8 sl_SI.ISO8859-2
# sl_SI.UTF-8 sr_YU.ISO8859-2 sr_YU.ISO8859-5 sr_YU.UTF-8
gslin@colo-p [~/work/jar] [01:45/W4] tree
.
├── build
│   ├── classes
│   │   └── org
│   │   └── gslin
│   │   └── test
│   │   └── HelloWorld.class
│   └── jar
│   └── HelloWorld.jar
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 98.54 98.52 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.52 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.52 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.52 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.54 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.54 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.54 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.54 73.53 99.88 1433 6.889 1 0.006 6.895
0.00 98.54 98.54 73.53 99.88 1433 6.889 1 0.006 6.895
;; ANSWER SECTION:
kktix.com. 21600 IN NS ns-1209.awsdns-23.org.
kktix.com. 21600 IN NS ns-1591.awsdns-06.co.uk.
kktix.com. 21600 IN NS ns-296.awsdns-37.com.
kktix.com. 21600 IN NS ns-971.awsdns-57.net.
ns-1209.awsdns-23.org. 172800 IN A 205.251.196.185
ns-1591.awsdns-06.co.uk. 172800 IN A 205.251.198.55
ns-296.awsdns-37.com. 172800 IN A 205.251.193.40
ns-971.awsdns-57.net. 172800 IN A 205.251.195.203
gslin@home [~] [02:16/W6] dig ptt.cc @168.95.1.1
; <<>> DiG 9.8.1-P1 <<>> ptt.cc @168.95.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48830
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 13
;; WARNING: recursion requested but not available
;; QUESTION SECTION: