Pedro c9s

View pharlcon
1 2 3 4 5 6 7 8 9 10
ab -n 1000 http://dev/work/php/router-benchmark/code/pharlcon/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
 
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
View gist:8273098
1 2 3 4 5 6 7 8 9 10
gb -n 1000 -c 10 http://localhost/work/php/phux/eg/hello.php
 
This is GoHttpBench, Version 0.1.9, https://github.com/parkghost/gohttpbench
Author: Brandon Chen, Email: parkghost@gmail.com
Licensed under the MIT license
 
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
View bank.pl
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env perl
use LWP::Simple qw(get);
use Encode;
use utf8;
use JSON;
 
binmode STDOUT, ":utf8";
 
$content = get 'http://www.esunbank.com.tw/event/announce/BankCode.htm';
$content = Encode::decode('big-5', $content);
View version_lt.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
# Usage:
#
# git push origin $(git tag | version_lt 1.7.0 | xargs -I{} echo :{})
#
# version_lt 1.6.0 1.7.0
split()
{
# Prefix local names with the function name to try to avoid conflicts
# local split_wordlist
View contacts_struct.go
1 2 3 4 5 6 7 8 9
package main
 
import "fmt"
 
type Contact struct {
Name string
Phone string
Age int
}
View contact_map.go
1 2 3 4 5 6 7 8 9 10
package main
 
import "fmt"
 
func main() {
contacts := map[string]string{}
contacts["John"] = "02-12345678"
contacts["Mary"] = "02-12345678"
 
if _, ok := contacts["Mary"]; ok {
View string_slice.go
1 2 3 4 5 6 7 8 9
package main
 
import "fmt"
 
func main() {
items := []string{"foo", "bar", "johnny"}
// items = append(items, 5, 6)
fmt.Printf("items %+v\n", items)
}
View int_slice.go
1 2 3 4 5 6 7 8 9 10
package main
 
import "fmt"
 
func main() {
items := []int{1, 2, 3, 4}
items = append(items, 5, 6)
newItems := items[3:]
subItems := items[:]
fmt.Printf("items %+v\n", items)
View gist:7577620
1 2 3 4 5 6 7 8 9 10
mtr -r google.com
HOST: c9smba.local Loss% Snt Last Avg Best Wrst StDev
3.|-- pcpc-3301.hinet.net 0.0% 10 3.3 5.8 2.5 29.3 8.3
4.|-- 220-128-11-118.hinet-ip.h 0.0% 10 15.6 9.5 2.8 51.1 15.1
5.|-- tpdt-3012.hinet.net 0.0% 10 8.9 10.2 6.0 31.8 7.7
| `|-- 220.128.11.58
| |-- 220.128.2.54
| |-- 220.128.2.58
6.|-- tyfo-3012.hinet.net 0.0% 10 5.5 11.2 4.7 50.5 13.9
7.|-- 220-128-9-165.hinet-ip.hi 0.0% 10 5.0 5.6 3.8 7.7 1.3
View git-truncate-history.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
rev=$1
if [[ -z $rev ]] ; then
echo "[rev] is required."
exit
fi
# create history branch from $rev
git branch history $rev
parent_rev=`git rev-parse $rev~1`
combined_rev=`echo '[Truncated history]' | git commit-tree "$parent_rev^{tree}"`
Something went wrong with that request. Please try again.