This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install nango@npm:@nangohq/[email protected] | |
Installs the package nangohq/[email protected]... under the alias nango |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=C8*GOOGLEFINANCE("CURRENCY:ILSUSD") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"contains(github.event.head_commit.message, 'deploy!')" | |
# https://stackoverflow.com/questions/63619329/github-action-get-commit-message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-list --objects --all | | |
git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | | |
sed -n 's/^blob //p' | | |
sort --numeric-sort --key=2 | | |
cut -c 1-12,41- | | |
$(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest | |
# source https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mount temp | |
sudo mount -o size=10M,rw,nodev,nosuid -t tmpfs tmpfs /tmp | |
# Resize root volume, find correct name by running lsblk | |
sudo growpart /dev/nvme0n1 1 | |
sudo resize2fs /dev/root | |
# Resize data volume | |
sudo resize2fs /dev/nvme1n1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(queryset.query) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gh issue create --title "My new issue" --body "Here are more details." --assignee @khaliqgant --project "Web Development Sprint" | |
# the cli only supports classic projects for now: https://github.com/cli/cli/issues/4547 | |
# docs: https://cli.github.com/manual/gh_issue_create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 cp --sse AES256 s3://my-bucket/image/p_2/1647967203002.jpg s3://images-production/p_3/1647967203002.jpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check expiration | |
kubeadm alpha certs check-expiration | |
kubeadm alpha certs renew all | |
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
# https://stackoverflow.com/questions/49885636/kubernetes-expired-certificate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM pg_stat_activity WHERE state = 'active'; | |
SELECT pg_cancel_backend(<PID>); | |
SELECT pg_terminate_backend(<PID>); | |
-- kill all active except active one | |
SELECT pg_terminate_backend(pid) | |
FROM pg_stat_activity |
NewerOlder