Skip to content

Instantly share code, notes, and snippets.

View gslin's full-sized avatar

Gea-Suan Lin gslin

View GitHub Profile
ubuntu@ip-10-93-96-50:~$ curl https://httpbin.org/ip
{
"origin": "18.141.144.15"
}
Start: 2020-02-22T23:52:07+0800
HOST: home.gslin.org Loss% Snt Last Avg Best Wrst StDev
1.|-- 2001:b010:ffff::1 0.0% 10 8.8 9.2 8.4 10.5 0.6
2.|-- 2001-b000-0082-0005-0022- 0.0% 10 9.7 11.3 8.9 21.2 3.6
3.|-- 2001-b000-0080-0003-0080- 70.0% 10 9.6 10.4 9.6 10.9 0.7
4.|-- 2001-b000-0080-0004-3022- 0.0% 10 10.6 10.0 9.0 11.5 0.9
5.|-- 2001-b000-0080-0004-4103- 0.0% 10 10.5 27.8 9.3 128.4 39.9
6.|-- 2001-b000-0080-0007-0000- 0.0% 10 35.7 34.2 32.1 36.6 1.6
7.|-- if-ae-2-2.thar1.hk2-hong- 0.0% 10 34.6 35.3 33.9 37.1 0.9
8.|-- if-ae-7-2.tcore1.hk2-hong 0.0% 10 37.1 38.2 35.5 43.1 2.0
INFO:root:start
INFO:root:Menu shown
INFO:root:Fetcher started
(indicator-sysmonitor:24837): Gdk-ERROR **: 14:24:46.148: The program 'indicator-sysmonitor' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadLength (poly request too large or internal Xlib length erro'.
(Details: serial 108076 error_code 16 request_code 32 (core protocol) minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
@gslin
gslin / gist:41393145fc933b42f282495d0754b059
Created September 23, 2019 07:58
Active Tickets, which I have participated. (Slow)
SELECT p.value AS __color__,
t.id AS ticket, summary, component,
priority, FROM_UNIXTIME(CONVERT(c.value / 1000000, UNSIGNED INTEGER), '%Y-%m-%d') AS due_date,
t.changetime AS _changetime, description AS _description,
reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
LEFT OUTER JOIN ticket_custom c ON t.id = c.ticket AND c.name = 'due_date'
LEFT JOIN (SELECT ticket AS id, author, MAX(time) FROM ticket_change WHERE author = $USER GROUP BY ticket) ticket_change USING (id)
WHERE t.status <> 'closed' AND (owner = $USER OR author = $USER)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
https://webkit.org/perf/sunspider/sunspider.html
https://webkit.org/perf/sunspider-1.0.2/sunspider-1.0.2/results.html?%7B%22v%22:%20%22sunspider-1.0.2%22,%20%223d-cube%22:%5B19,24,22,19,21,20,20,20,22,28%5D,%223d-morph%22:%5B17,15,16,15,16,16,16,17,17,21%5D,%223d-raytrace%22:%5B33,27,34,31,29,28,28,147,34,39%5D,%22access-binary-trees%22:%5B6,7,6,7,6,8,7,9,8,10%5D,%22access-fannkuch%22:%5B19,19,22,20,20,24,25,26,21,22%5D,%22access-nbody%22:%5B6,6,6,8,9,12,9,7,12,11%5D,%22access-nsieve%22:%5B11,12,16,13,14,15,14,14,15,17%5D,%22bitops-3bit-bits-in-byte%22:%5B3,5,4,4,4,4,5,4,5,5%5D,%22bitops-bits-in-byte%22:%5B6,7,8,8,6,6,7,9,7,8%5D,%22bitops-bitwise-and%22:%5B4,4,5,5,5,5,6,6,6,6%5D,%22bitops-nsieve-bits%22:%5B9,10,9,9,9,9,9,10,10,10%5D,%22controlflow-recursive%22:%5B8,6,7,8,7,6,7,8,8,8%5D,%22crypto-aes%22:%5B19,20,16,23,28,25,22,19
@gslin
gslin / nench.txt
Last active February 13, 2019 06:12
Linode (Dedicated 4GB) v.s. AWS (c5.large)
(Remove tee part)
root@localhost:~# (curl -s wget.racing/nench.sh | bash; curl -s wget.racing/nench.sh | bash) 2>&1
-------------------------------------------------
nench.sh v2018.04.14 -- https://git.io/nench.sh
benchmark timestamp: 2019-02-12 19:10:00 UTC
-------------------------------------------------
Processor: AMD EPYC 7501 32-Core Processor
CPU cores: 2
ETCD_NAME="infra0"
ETCD_LISTEN_PEER_URLS="http://0.0.0.0:2380"
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://172.31.66.98:2380"
ETCD_INITIAL_CLUSTER="infra0=http://172.31.66.98:2380,infra1=http://172.31.65.18:2380,infra2=http://172.31.66.106:2380"
ETCD_INITIAL_CLUSTER_STATE="new"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
ETCD_ADVERTISE_CLIENT_URLS="http://172.31.66.98:2379"
ETCD_NAME="infra1"
start_key | end_key | range_id | replicas | lease_holder
---------------------+---------------------+----------+----------+--------------
| /415398993811963906 | 62 | {2,5,9} | 9
/415398993811963906 | /415399147321262082 | 63 | {1,2,9} | 1
/415399147321262082 | /415399307371053060 | 64 | {1,2,9} | 9
/415399307371053060 | /415399460717821956 | 65 | {1,4,10} | 4
/415399460717821956 | /415399619172302856 | 66 | {2,8,9} | 8
/415399619172302856 | /415399777000587274 | 67 | {5,9,10} | 9
/415399777000587274 | /415399955386466306 | 68 | {1,3,9} | 9
/415399955386466306 | /415400519894597641 | 70 | {3,5,9} | 9
Pushing to git@gitea.gslin.com:gslin/xxx.git
Gitea: Internal error
UpdatePublicKey: Failed to update public key: invalid connection
To git@gitea.gslin.com:gslin/xxx.git
= [up to date] master -> master
updating local tracking ref 'refs/remotes/origin/master'
error: failed to push some refs to 'git@gitea.gslin.com:gslin/xxx.git'
$ git push -v --follow-tags
Pushing to git@gitea.gslin.com:gslin/tv.git
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 405 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Gitea: Internal error
remote: retrieve protected branches information failed: Failed to update public key: EOF
To git@gitea.gslin.com:gslin/tv.git