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
| BRANCHES | |
| --------- | |
| Create a new branch from a current branch: | |
| $ git checkout -b <new-branch> | |
| Create a new branch from an existing branch: | |
| $ git checkout -b <new-branch> <existing-branch> | |
| Delete local branch: | |
| $ git branch -D <branch-name> |
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
| Find file (case-insensitive) with name beginning with "postgres" in current directory: | |
| $ find . -iname postgres* | |
| Find directory (case-insensitive) in filesystem with name "s2i": | |
| $ sudo find / -type d -iname "s2i" | |
| Find text within a set of files in current directory: | |
| $ find . -iname *.java | xargs grep -i someTextToSearchFor |
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
| Use '\' to escape '!' | |
| Upload | |
| $ curl -k -v -u myuser:mypassword --upload-file test.zip https://nexus.my-domain.com:9443/repository/binary-artifact-repository/test.zip | |
| Download | |
| $ curl -k -v -O -u myuser:mypassword https://nexus.my-domain.com:9443/repository/binary-artifact-repository/test.zip |
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
| $.ajax({ | |
| beforeSend: function(request) { | |
| request.setRequestHeader("APP_USER", "CN=TestUser1, OU=My Org Unit, O=My Org, C=US"); | |
| }, | |
| url: "/app/rest/list/ADMIN_TYPE", | |
| success: function(data) { | |
| console.log(data); | |
| } | |
| }); |
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
| List all containers: | |
| $ docker ps -a | |
| Get shell in running container: | |
| $ docker exec -it <container name> /bin/bash | |
| Stop a specific container: | |
| $ docker stop <container-id> | |
| Stop all running containers: |
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
| Roll back deployment to previous version: | |
| $ oc rollback <app-name> --to-version=<deployment-num> | |
| Get access to pod where it fails: | |
| $ oc debug <pod-name> | |
| Create image stream from image in external registry: | |
| $ oc import-image <image-name> --from=nexus.my-domain.com:5000/<image-name> --confirm | |
| View logs relating to build: |
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
| # stop all containers | |
| docker stop $(docker ps -a -q) | |
| # delete stopped containers | |
| docker rm $(docker ps -a -q) | |
| # delete all images | |
| docker rmi -f $(docker images -q) |
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
| if [ $# -eq 0 ]; then | |
| echo "No new project name specified. Exiting." | |
| exit 1 | |
| fi | |
| read -p "OpenShift username: " username | |
| read -s -p "OpenShift password: " password | |
| mkdir openshift-mig-temp |
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
| oc delete imagestream my-app | |
| oc delete buildconfig my-app | |
| oc delete dc my-app | |
| oc delete service my-app | |
| oc delete imagestream my-app | |
| oc delete route my-app |
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
| xrandr --newmode "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync | |
| xrandr --addmode Virtual1 1920x1080_60.00 | |
| xrandr --output Virtual1 --mode 1920x1080_60.00 |