Skip to content

Instantly share code, notes, and snippets.

View hatchan's full-sized avatar
💭
¯\_(ツ)_/¯

Benno van den Berg hatchan

💭
¯\_(ツ)_/¯
  • Amsterdam, Netherlands
  • 19:31 (UTC +02:00)
View GitHub Profile
@hatchan
hatchan / wercker.yml
Created February 23, 2015 16:37
Update git using install-packages step on wercker.com
deploy:
steps:
- wercker/install-packages
packages: git
# insert other steps here
@hatchan
hatchan / wercker.yml
Created November 3, 2014 10:06
Install ftp during a build or deploy on wercker
build:
steps:
- script:
name: install ftp
code: sudo apt-get update -y && sudo apt-get install ftp -y
deploy:
steps:
- script:
name: install ftp
code: sudo apt-get update -y && sudo apt-get install ftp -y
@hatchan
hatchan / wercker.yml
Created September 30, 2014 16:53
Example wercker.yml showing the `cwd` property. The first will use `$WERCKER_SOURCE_DIR` as the working directory. The second one will use the `src` relative path as the source dir. See: http://devcenter.wercker.com/articles/steps/#toc_2
box: wercker/rvm
build:
steps:
- bundle-install
- bundle-install:
cwd: src
@hatchan
hatchan / wercker.yml
Created August 12, 2014 08:53
Changing working directory with wercker, see http://devcenter.wercker.com/articles/steps/#toc_2
build:
steps:
- npm-install:
cwd: app
@hatchan
hatchan / gist:9cee3857feff34dc6c3c
Created August 11, 2014 12:25
Create a dot every 60 seconds to simulate activity
( while [ 1 ]; do echo .; sleep 60; done; ) &
# Long running task
kill %1
@hatchan
hatchan / wercker.yml
Created August 4, 2014 11:38
Use golang executables as wercker build artifact
box: wercker/golang
build:
steps:
- wercker/setup-go-workspace
- script:
name: get dependencies
code: go get -v ./...
- script:
name: build executable
code: go build -a -v ./...
build:
steps:
- script:
name: step
code: >
if [ true ]; then
echo "true";
fi
# The > operator removes all new lines and extra space
@hatchan
hatchan / wercker.yml
Created June 12, 2014 10:11
Multiline yaml to singleline string yaml example
build:
steps:
script:
name: multiline bash
code: >
if [ -f "$EXAMPLE_PATH" ]; then
echo "path exists";
else
echo "path does not exist";
promise.then(function(results) {
do_stuff();
})
.catch(function(err) {
console.error(err);
});
build:
steps:
- script:
name: Enable virtual display
code: |-
# Start xvfb which gives the context an virtual display
# which is required for tests that require an GUI
export DISPLAY=:99.0
start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
# Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.