A set of Hacks and scripts for WSL2 Ubuntu distro
This file contains 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
# list instancess with ip | |
aws ec2 describe-instances --filters "Name=tag:Team,Values=Tools" --query 'Reservations[*].Instances[*].{Instance:InstanceId,Name:Tags[?Key==`Name`]|[0].Value,IP:PrivateIpAddress}' |
This file contains 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
# local | |
git tag -d <tag_name> | |
# remote | |
git push --delete origin tagname | |
# Delete all local tags and get the list of remote tags: | |
git tag -l | xargs git tag -d | |
git fetch | |
# Remove all remote tags | |
git tag -l | xargs -n 1 git push --delete origin |
This file contains 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
## delete files | |
# rm indexed | |
rm a_{000750..000850} | |
# delete old | |
find . -type f -mtime +30 -delete | |
# delete by size | |
find . -type f -size 1k -delete | |
# delete dir | |
find . -depth -mtime +30 -execdir rm -rf {} + |
curl -H "Authorization: token OAUTH-TOKEN" https://api.github.com/users/codertocat -I
500mb
wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
10mb
wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip
default domain
server {
listen 80 default_server;
access_log /var/log/nginx/default__access.log main;
error_log /var/log/nginx/default__error.log error;
client_max_body_size 512k;
http://nginx.org/en/linux_packages.html#mainline
Set limits
/lib/systemd/system/nginx.service
[Service]
NewerOlder