This little script is used to resize and repartition disks in GKE.
- gcloud
#! /bin/bash | |
#################### Usage | |
# | |
# 1. Register an account on https://www.pushbullet.com/ | |
# 2. Add devices | |
# 3. Create an access token https://www.pushbullet.com/#settings/account | |
# 4. save it to your bash profile $PUSHBULLET_API_TOKEN | |
# 5. Re-source, Execute the following (you can remove jq): | |
# |
``` | |
level=debug ts=2020-03-20T08:42:41.652898089Z caller=mock.go:159 msg=Get key=collectors/ring modify_index=2 value="\"7\\xd8\\n5\\n\\x14logging-store-loki-0\\x12\\x1d\\n\\x13192.168.23\"" | |
level=debug ts=2020-03-20T08:42:41.65371781Z caller=mock.go:86 msg=CAS key=collectors/ring modify_index=2 value="\"\\xad\\x1e\\xf0<\\n3\\n\\x14logging-store-loki-0\\x12\\x1b\\n\\x13192.168.\"" | |
level=debug ts=2020-03-20T08:42:41.653765369Z caller=mock.go:159 msg=Get key=collectors/ring modify_index=3 value="\"\\xad\\x1e\\xf0<\\n3\\n\\x14logging-store-loki-0\\x12\\x1b\\n\\x13192.168.\"" | |
level=debug ts=2020-03-20T08:42:41.653919855Z caller=mock.go:113 msg=Get key=collectors/ring wait_index=3 | |
level=debug ts=2020-03-20T08:42:46.652925235Z caller=mock.go:113 msg=Get key=collectors/ring wait_index=0 | |
level=debug ts=2020-03-20T08:42:46.652971628Z caller=mock.go:159 msg=Get key=collectors/ring modify_index=3 value="\"\\xad\\x1e\\xf0<\\n3\\n\\x14logging-store-loki-0\\x12\\x1b\\n\\x13192.168.\"" | |
level=debug ts=2020-03-20T08:42:46.65 |
I hereby claim:
To claim this, I am signing this object:
$grid_width:66px; | |
$grid_space: 16px; | |
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 { | |
display: inline; | |
float: left; | |
position: relative; | |
margin-left: $grid_space / 2; | |
margin-right: $grid_space / 2; | |
} |
#!/bin/bash | |
wget -N -P /tmp http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz | |
gunzip -k /tmp/GeoLite2-City.mmdb.gz | |
mv /tmp/GeoLite2-City.mmdb /varGeoLite2-City.mmdb |
# instance group instances | |
gcloud compute instance-groups managed list-instances playground-etcd-group-manager --zone europe-west1-d --format json |jq .[].instance |rev |cut -d/ -f1 | rev | tr -d '"' |
#Output# | |
## Ignore command fails ## | |
`|| true` | |
# String Manipulation # | |
## Get value seperated by tab/space ## | |
`| awk '{print $2}'` |
/** | |
* Show inserts and delets by users in a repo | |
* | |
* | |
**/ | |
perl -e 'foreach(`git shortlog -s -n`){'\ | |
'($c,$a)=$_=~/^\s*(\d+)\s*(.+?)\s*$/;$p=$m=0;'\ | |
'foreach(`git log --author="$a" --pretty=tformat: --numstat -C`)'\ | |
'{($pp,$mm)=$_=~/^\s*(\d+)\s+(\d+)/;$p+=$pp;$m+=$mm;}'\ |