Because my memory sucks
-
aws ecr get-login --no-include-email --region us-west-2
-
$$(aws ecr get-login --no-include-email --region us-east-1)
-
aws sts get-caller-identity --output text --query 'Account'
-
aws sts get-caller-identity --output text --query 'Account' --profile=<some profile name>
aws s3 rb s3://bucket-name --force
aws s3 ls s3://some-bucket/some-folder --recursive > ~/myFile.txt
aws s3api list-objects-v2 --bucket="some-bucket" --prefix="SomeFolder/" --start-after="SomeFolder/SomeFile.txt" > ~/Desktop/s3-listing.json
brew services list
brew cleanup -n
andbrew cleanup
# Docker
docker context use rootless
docker exec -it <docker container/image name> /bin/bash
docker run --name <name> --net <network name> -p 0000:0000 -it <image name>
# Docker Compose (v2)
docker compose ls
docker compose ps
docker compose up
docker compose down
docker compose up -d
docker compose up -d <service name> --build
docker compose logs <service name> &2> ~/Desktop/logfile.log
docker compose logs <service name> > ~/Desktop/logfile.log
docker compose logs -f <some service name in the docker compose file>
# In your .dbdiff file
<arbitraryname>:
user: dev
password: password
port: 3306
host: 127.0.0.1
Note: Make sure you leave the named server1
in the .dbdiff file, or the program chokes, even if you have other named DB's in the file.
./dbdiff --type=schema alliesDev.allies:alliesProd.allies
./dbdiff --type=schema clarityDev.clarity:clarityProd.clarity
eb printenv
eb setenv key=variable
git apply --3way filename.patch
git diff --cached > mypatch.patch
git reset --hard HEAD^
git status .
git stash list
git stash pop
git stash drop
- Drops the "top" stashgit show -s --format=%ci
git show -s --format=%ai
git reset --soft HEAD~1
git ls-tree -r master --name-only
git clone --depth=1 <github repository>
git remote add <somename> <some repo url>
git pull <arbitrary name you gave the upstream> <branch in that upstream you want to pull from>
git remote set-url --add --push origin <some repo url>
git push --set-upstream origin master
git rev-parse --short HEAD 2> /dev/null | sed "s/\(.*\)/\1/"
go env GOPATH
lando yarn start:dev
lando ts-node /scripts/generate-typings.ts
lando yarn run typeorm:migrate <migration name>
lando yarn run typeorm:run
du -shc * | sort -h
find . -type f -size +250M
- For BASH
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc source ~/.bashrc
- https://askubuntu.com/a/391087
- For ZSHRC
\history -E
fc -li 100
ssh-keygen -R <hostname>
- Removes host ssh key so you can accept a new one
tail -c 25000 -f
dos2unix -u --ascii somefile.txt
dos2unix -ulb somefile.txt
dos2unix -u -ul -b somefile.txt
rsync --partial -rlvz --exclude='*/sites/default/files*' --size-only --ipv4 --progress -e 'ssh' user@somehost.com:/var/www/vhosts/somefolder/somesite .
open myfile.txt
base64 -d <<< dm9pbGE=
- Base64 Decodeecho -n "voila" | base64
- Echo string without newline character and pipe to base64 for encoding
node -p "require('./package.json').version"
forever -w app.js --watchIgnore node_modules
npm i -g vue-cli
- Install vue-cli globallynpm version <some version | minor | major | patch>
- Have NPM increment the version number for younpm publish --access=public --tag next --dry-run
- Dry run of publishing to the "next" dist-tag
python
python3
pip install virtualenv
pip3.11 install virtualenv
virtualenv venv
source venv/bin/activate
python --version
python3 -m http.server 8080 -d <where to start it at>
rover config auth
rover graph fetch
rover dev --url <url> --name <where to stitch it into the schema>
rover subgraph introspect <url or local url>
sls deploy
sls package
sls deploy list
sls deploy function -f <function_name>
sls deploy --force function --function app
sls deploy --function-name=app --aws-s3-accelerate
serverless create --template aws-nodejs --path tribute-serverless
severless invoke local --function app
code -g myfile.txt:100