Skip to content

Instantly share code, notes, and snippets.

@omerd2
omerd2 / ansible-summary.md
Created August 24, 2022 14:21 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@omerd2
omerd2 / sonar-set-project-as-private.sh
Created April 3, 2022 13:22 — forked from phaniamt/sonar-set-project-as-private.sh
How to set all existing projects to private in SonarQube
# requirements: curl, jq
# By default this script will get 100 projects at a time
# If you have more than 100 projects . run this script multiple times
USER=user
PASSWORD=password
SONAR_URL=http://localhost:9000
for pkey in `curl ${SONAR_URL}/api/components/search?qualifiers=TRK | jq -r .components[].key`; do
curl -X POST -v -u ${USER}:${PASSWORD} ${SONAR_URL}/api/projects/update_visibility?project=${pkey}\&visibility=private;
done
@omerd2
omerd2 / user-profile.cmd
Created February 14, 2022 09:45 — forked from lukescammell/user-profile.cmd
This enables portable SSH keys in cmder, enabling you to have full SSH access using cmder portably on a USB (for example). Please note that when you ssh-keygen, it will still default to %USERPROFILE%, so you will either have to change the path on generation, or manually move the keys to your %CMDER_ROOT%\config\.ssh directory.
:: use this file to run your own startup commands
:: use in front of the command to prevent printing the command
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"
:: set "PATH=%CMDER_ROOT%\vendor\whatever;%PATH%"
:: LS 2017-09-12_17.35.11
:: ======================
:: Copied from %CMDER_ROOT%\vendor\init.bat
@omerd2
omerd2 / linux-shell-docker-cli.sh
Created December 21, 2021 19:07 — forked from rafaeltuelho/linux-shell-docker-cli.sh
Some useful shell aliases and function for Docker command line
# Docker aliases
alias di='sudo docker images'
alias dps='sudo docker ps -a'
# useful Docker functions
dock-run() { sudo docker run -i -t --privileged $@ ;}
dock-exec() { sudo docker exec -i -t $@ /bin/bash ;}
dock-log() { sudo docker logs --tail=all -f $@ ;}
dock-port() { sudo docker port $@ ;}
dock-vol() { sudo docker inspect --format '{{ .Volumes }}' $@ ;}