This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| # check if variable is array, returns 0 on success, 1 otherwise | |
| # @param mixed | |
| is_array() | |
| { #detect if arg is an array, returns 0 on sucess, 1 otherwise | |
| [ -z "$1" ] && return 1 | |
| if [ -n "$BASH" ]; then | |
| declare -p ${1} 2> /dev/null | grep 'declare \-a' >/dev/null && return 0 | |
| fi | |
| return 1 |
| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |
| # fetch the changes from the remote | |
| git fetch origin | |
| # show commit logs of changes | |
| git log master..origin/master | |
| # show diffs of changes | |
| git diff master..origin/master | |
| # apply the changes by merge.. |
| wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
| # --no-check-cerftificate was necessary for me to have wget not puke about https | |
| curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
| /* Wooden Wall [CSS] */ | |
| /* Made with ♥ by Louis Bullock */ | |
| html,body { | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| html { | |
| display:block; |
| <# | |
| .SYNOPSIS | |
| Converts files to the given encoding. | |
| Matches the include pattern recursively under the given path. | |
| .EXAMPLE | |
| Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8 | |
| #> | |
| function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') { | |
| $count = 0 |