Skip to content

Instantly share code, notes, and snippets.

View y56's full-sized avatar
🌏
(* ̄▽ ̄)/‧☆*"`'*-.,_,.-*'`"*-.,_☆

Eugene Wang y56

🌏
(* ̄▽ ̄)/‧☆*"`'*-.,_,.-*'`"*-.,_☆
View GitHub Profile
@y56
y56 / gist:b9eae675588010b4478b24aa0ed6e1b4
Created August 24, 2021 18:39
delete the lastest downloaded item
trash ~/Downloads/$(ls -1t ~/Downloads/ | head -1)
@y56
y56 / compare-delete.sh
Created June 4, 2021 03:56
[shell] compare image height and width, and then do sth
for f in *.png;
do
if [ $(file "$f" | cut -d ',' -f2 | cut -d ' ' -f2) -gt $(file "$f" | cut -d ',' -f2 | cut -d ' ' -f4) ]
then
echo "width > height"
else
echo "width < height"
fi
done
@y56
y56 / note.md
Last active June 4, 2021 03:44
the number of lines of a file/folder's displayed name in Ubuntu Nautilus file manager (aka Files)?
@y56
y56 / note.md
Created May 7, 2021 22:19
ubuntu 18.04 change login backgroung
@y56
y56 / curl 3 payloads.sh
Created May 3, 2021 09:01
to test defaultValue: Sequelize.NOW
token='goodToken'
curl -D - -X POST http://localhost:3030/orders \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-US,zh-TW;q=0.5' --compressed \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer '"$token"'' \
-H 'Origin: https://10.10.10.10:8080' \
{
"campaign_id": "fake行銷活動ID_1",
"campaign_name": "fake行銷活動名稱",
"start_timestamp": "2021-02-01",
"end_timestamp": "2021-04-30",
"is_by_aics": "false",
"campaign_start": "2021-02-01",
"campaign_end": "2021-05-04",
"ads": [
{
////////NAME
////////alertmanager-demo-prometheus-operator-alertmanager-0
Name: alertmanager-demo-prometheus-operator-alertmanager-0
Namespace: default
Priority: 0
Node: aks-agentpool-62526533-vmss000001/10.240.0.5
Start Time: Fri, 16 Apr 2021 11:49:25 +0800
Labels: alertmanager=demo-prometheus-operator-alertmanager
app=alertmanager
controller-revision-hash=alertmanager-demo-prometheus-operator-alertmanager-d6f7f9bbf
////////NAME
////////druid-broker-75bf8774cc-hgb9r
Name: druid-broker-75bf8774cc-hgb9r
Namespace: default
Priority: 0
Node: aks-agentpool-62526533-vmss000011/10.240.0.8
Start Time: Mon, 12 Apr 2021 18:47:09 +0800
Labels: app=druid
component=broker
pod-template-hash=75bf8774cc
NAME STATUS AGE
namespace/default Active 19d
namespace/kube-node-lease Active 19d
namespace/kube-public Active 19d
namespace/kube-system Active 19d
namespace/kubernetes-dashboard Active 5d23h
NAMESPACE NAME DESIRED CURRENT READY AGE
default replicaset.apps/druid-broker-7f6c469b5 2 2 2 12h
default replicaset.apps/druid-coordinator-85599f58f6 1 1 1 12h
@y56
y56 / cpp libraries leetcode includes for me
Last active December 8, 2020 23:39
cpp libraries leetcode includes for me
//
//