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:
| This playbook has been removed as it is now very outdated. |
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
| #!/usr/bin/env python | |
| # | |
| # Python Timer Class - Context Manager for Timing Code Blocks | |
| # Corey Goldberg - 2012 | |
| from timeit import default_timer | |
| class Timer(object): |
| // Sometimes it's necessary to do a bit of clean-up | |
| Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) { | |
| el.removeAttribute('data-confirm'); | |
| el.click(); | |
| }); |
git log --oneline -1 <PR-BRANCH>git push -f origin :| #!/usr/bin/env python3 | |
| # original: https://raw.githubusercontent.com/tweksteen/jenkins-decrypt/master/decrypt.py | |
| # requires: pycrypto | |
| import re | |
| import sys | |
| import base64 |
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
| # Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
| # Will include all hosts the playbook is run on. | |
| # Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
| - name: "Build hosts file" | |
| lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
| when: hostvars[item].ansible_default_ipv4.address is defined | |
| with_items: groups['all'] |
| jenkins.model.Jenkins.getInstance().getUpdateCenter().getSites().each { site -> | |
| site.updateDirectlyNow(hudson.model.DownloadService.signatureCheck) | |
| } | |
| hudson.model.DownloadService.Downloadable.all().each { downloadable -> | |
| downloadable.updateNow(); | |
| } | |
| def plugins = jenkins.model.Jenkins.instance.pluginManager.activePlugins.findAll { | |
| it -> it.hasUpdate() |