Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| --- | |
| - name: Playbook showcasing conversion from with_X loops to loop+filters | |
| hosts: localhost | |
| gather_facts: false | |
| vars: | |
| items: | |
| - | |
| - foo | |
| - | |
| - bar |
| echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
| #!/bin/bash | |
| # get latest docker compose released tag | |
| COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) | |
| # Install docker-compose | |
| sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" | |
| chmod +x /usr/local/bin/docker-compose | |
| sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose" |
| # Bash best practices and style-guide | |
| Just simple methods to keep the code clean. | |
| Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/). | |
| ## Quick big rules | |
| * All code goes in a function | |
| * Always double quote variables |
| # this is a copay/paste combination of https://gist.github.com/nictuku/13afc808571e742d3b1aaa0310ee8a8d & https://gist.github.com/Rahul91/f051a391fac62ccebb581370b0ac644d | |
| # so that we can install virtualbox via apt-get | |
| for x in xenial xenial-security xenial-updates; do | |
| egrep -qe "deb-src.* $x " /etc/apt/sources.list || echo "deb-src http://archive.ubuntu.com/ubuntu ${x} main universe" | sudo tee -a /etc/apt/sources.list | |
| done | |
| echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.list | |
| wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - | |
| # allow us to make a kernel |
| --- | |
| - hosts: localhost | |
| gather_facts: no | |
| vars_files: | |
| - vcenter_vars.yml | |
| vars: | |
| hostname: kickstart_vm | |
| tasks: | |
| - name: Boot VM with CentOS 7 installation iso in CDROM | |
| vmware_guest: |
| --- | |
| - hosts: localhost | |
| gather_facts: no | |
| vars_files: | |
| - vcenter_vars.yml | |
| vars: | |
| hostname: kickstart_vm | |
| tasks: | |
| - name: Boot VM with CentOS 7 installation iso in CDROM | |
| vmware_guest: |