Skip to content

Instantly share code, notes, and snippets.

View yuriburger's full-sized avatar
🏠
Working from home

Yuri Burger yuriburger

🏠
Working from home
View GitHub Profile
@yuriburger
yuriburger / git-clear-commit-history.sh
Last active April 30, 2022 21:47
[git clear commit history] Git clear commit history #git
git checkout --orphan FixHistory
git add -A # Add all files and commit them
git commit -m "Fix history"
git branch -D develop # Deletes the master branch
git branch -m develop # Rename the current branch to master
git push -f origin develop # Force push master branch to github
git gc --aggressive --prune=all # remove the old files
@yuriburger
yuriburger / npm-dep-tree.sh
Created May 13, 2020 14:18
[npm dep tree] Filter the NPM dependency tree #npm
npx npm-remote-ls jsrsasign
@yuriburger
yuriburger / mvn-dep-tree.sh
Created May 13, 2020 14:14
[mvn dep tree] Filter the Maven dependency tree #maven
mvn dependency:tree -Dincludes=org.apache.tomcat.embed:tomcat-embed-core
@yuriburger
yuriburger / set-azure-tenant-id.sh
Last active April 23, 2020 09:47
[set azure tenant id] set azure tenant id with #az #cli
// vim: syntax=bash
az login --tenant <tenantid> --allow-no-subscriptions
@yuriburger
yuriburger / run-mongo-docker.sh
Last active February 20, 2020 10:49
[run mongo] Run MongoDB in a Docker container #mongo #docker
sudo docker run -d --name my-mongo -p 27017:27017 -v ~/data:/data/db \
-e MONGO_INITDB_ROOT_USERNAME=<myuser> \
-e MONGO_INITDB_ROOT_PASSWORD=<mysecret> \
mongo
@yuriburger
yuriburger / git-save-and-reset.sh
Created February 3, 2020 08:11
[git save work and reset to remote] Git save work and reset to remote branch #git
git commit -a -m "Saving my work"
git branch my-saved-work
git fetch origin
git reset --hard origin/master
@yuriburger
yuriburger / update-all-the-things.txt
Last active April 23, 2020 09:44
[update all the things] update all the things #powershell #cli #angular #npm #maven #az
# AZ CLI on Ubuntu
sudo apt-get update
sudo apt-get install azure-cli
# AZ CLI on Windows
# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
# Maven on Windows
https://maven.apache.org/download.cgi
@yuriburger
yuriburger / rest-service-principal-secret
Last active October 24, 2019 05:43
[reset service principal secret] Reset a Service Principal Client Secret #azure
// vim: syntax=bash
az ad sp list --display-name <displayname>
az ad sp credential reset --name <appId> --years 1
@yuriburger
yuriburger / clear-commit-history.sh
Created September 18, 2019 14:48
[clear commit history] clear git commit history #git
git checkout --orphan temp_branch
git add -A
git commit -am "Initial commit"
git branch -D master
git branch -m master
git push -f origin master
@yuriburger
yuriburger / upload-image.sh
Last active September 5, 2019 14:21
[upload docker image to private repo] upload docker image to private repo #docker
docker tag <image> <repo uri>/<repository name>
docker push <repo uri>/<repository name>