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
| #!/usr/bin/python | |
| DOCUMENTATION = ''' | |
| --- | |
| module: github_repo | |
| short_description: Manage your repos on Github | |
| ''' | |
| EXAMPLES = ''' | |
| - name: Create a github Repo |
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
| # hat-tip: http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/ | |
| # cleanup docker: | |
| docker rm -v $(docker ps -a -q -f status=exited) | |
| docker rmi $(docker images -f "dangling=true" -q) | |
| docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes |
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
| #!/bin/bash | |
| docker-compose run web python manage.py test | |
| RESULT=$? | |
| if [ $RESULT -ne 0 ]; then | |
| echo "" | |
| echo "" | |
| echo "\******************" | |
| echo "Oh hell no!" | |
| echo "The tests have failed. Cancelling push" | |
| echo "------------------" |
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
| - hosts: localhost | |
| vars: | |
| - kong_admin_base_url: "http://api.example.com:8001" | |
| - kong_base_url: "http://api.example.com:8000" | |
| - kong_consumers: | |
| - username: Jason | |
| key: 123 | |
| tasks: | |
| - name: Register APIs |
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
| --- | |
| language: python | |
| python: "2.7" | |
| env: | |
| - SITE=test.yml | |
| before_install: | |
| - sudo apt-get update -qq |
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
| """ | |
| DataFrame: | |
| project_id hours overtime day | |
| 0 3 4 False 2015-10-07 | |
| 1 3 6 False 2015-10-07 | |
| 2 3 7 False 2015-10-07 | |
| 3 2 5 False 2015-10-07 | |
| 4 2 4 False 2015-10-07 | |
| 5 1 4 False 2015-10-07 |
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
| { | |
| "name": "jenkins", | |
| "active": true, | |
| "events": [ | |
| "push" | |
| ], | |
| "config": { | |
| "jenkins_hook_url": "http://ci.jenkins-ci.org/github-webhook/" | |
| } | |
| } |
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
| # start / stop / restart / status | |
| systemctl start test | |
| systemctl stop test | |
| systemctl restart test | |
| systemctl status test | |
| # logs use journalctl: | |
| # tail the logs for unit `django` | |
| journalctl -f -u django |
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
| # Get the ansible facts | |
| ansible -i {inventory_file} -u {username} -m setup {hostname} |
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
| redis-cli incr http_port | cut -c1-8 |