Skip to content

Instantly share code, notes, and snippets.

Gea-Suan Lin gslin

Block or report user

Report or block gslin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gslin
gslin / gist:41393145fc933b42f282495d0754b059
Created Sep 23, 2019
Active Tickets, which I have participated. (Slow)
View gist:41393145fc933b42f282495d0754b059
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)
View gist:015f8f72b19661925bbdd0358a57005c
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 Feb 13, 2019
Linode (Dedicated 4GB) v.s. AWS (c5.large)
View nench.txt
(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
View gist:8a08e52d141dfe36631c91c8b42dd0dc
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"
View cockroachdb-range.txt
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
View mysqld.log
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'
View gitea.log
$ 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
View gist:c8f265436ff3a82b9662e0df86fbec63
gslin@home [~] [00:32/W5] curl -i https://www.mybank.com.tw/
HTTP/1.1 302 Moved Temporarily
Content-Length: 0
Content-Type: text/html; charset=utf-8
Location: https://www.mybank.com.tw/mybank/Home/WRedirect
Date: Mon, 06 Aug 2018 16:32:15 GMT
Connection: keep-alive
gslin@home [~] [00:32/W5] curl -i https://www.mybank.com.tw/mybank/Home/WRedirect
HTTP/1.1 302 Moved Temporarily
View gist:a700583d4e5bbbb96c1b5ad2c300253f
ubuntu@ip-172-31-3-90:/tmp$ sudo ./install auto
I, [2018-07-27T06:51:43.123116 #1205] INFO -- : Starting Ruby version check.
E, [2018-07-27T06:51:43.123341 #1205] ERROR -- : Current running Ruby version for root is 2.5.1, but Ruby version 2.x needs to be installed.
E, [2018-07-27T06:51:43.123481 #1205] ERROR -- : If you already have the proper Ruby version installed, please either create a symlink to /usr/bin/ruby2.x,
E, [2018-07-27T06:51:43.123637 #1205] ERROR -- : or run this install script with right interpreter. Otherwise please install Ruby 2.x for root user.
E, [2018-07-27T06:51:43.123754 #1205] ERROR -- : You can get more information by running the script with --help option.
View mystays-wire
gslin@Gea-suandeMacBook-Pro [~] [04:33/W3] mtr --report 8.8.8.8
Start: 2018-07-14T04:33:55+0900
HOST: Gea-suandeMacBook-Pro.local Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.112.0.1 0.0% 10 0.8 0.8 0.6 1.2 0.2
2.|-- osknik32.asahi-net.or.jp 0.0% 10 2.6 2.6 2.1 3.2 0.3
3.|-- osknik32-v1.asahi-net.or. 0.0% 10 2.8 2.7 2.3 3.0 0.2
4.|-- tkybi6-v51.asahi-net.or.j 0.0% 10 3.0 3.3 3.0 3.6 0.2
5.|-- os4cr1-v1035.asahi-net.or 0.0% 10 4.2 3.6 3.3 4.2 0.3
6.|-- os4ni1-v1038.asahi-net.or 0.0% 10 5.2 4.1 3.4 5.2 0.5
7.|-- 209.85.174.82 0.0% 10 11.0 11.1 10.5 12.7 0.6
You can’t perform that action at this time.