Skip to content

Instantly share code, notes, and snippets.

If you're using Docker, then you'll need to run all of the cordova commands inside your Docker container. For example:

$ docker run \
  --volume="$HOME/watson-calorie-counter/mobile:/mobile" \
  calorie-counter \
  cordova --help

Existing:

With Watson

Want to take your Watson app to the next level? Looking to leverage Watson Brand assets? Join the With Watson program which provides exclusive brand, marketing, and tech resources to amplify and accelerate your Watson embedded commercial solution.

Revised:

With Watson: Want to take your Watson app to the next level? Looking to utilize Watson Brand assets? Join the With Watson program to leverage exclusive brand, marketing, and tech resources to amplify and accelerate your Watson embedded commercial solution.

@dolph
dolph / .gitignore
Last active December 8, 2016 22:48
Shell script to build a virtualbox VM.
*.vdi
*.iso
@dolph
dolph / ssh_config
Last active November 30, 2016 17:38
Route *.lxd hostnames from the LXD host to the appropriate LXD container via ~/.ssh/config regardless of host networking config
# This provides support for `ssh root@<container-name>.lxd`, for example.
Host *.lxd
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ProxyCommand nc $(lxc list -c s4 $(echo %h | sed "s/\.lxd//g") %h | grep RUNNING | cut -d' ' -f4) %p
@dolph
dolph / _README.md
Last active August 17, 2016 21:23
tl;dr zero-downtime database migrations in SQLite using triggers
  • Zero-downtime: Multiple releases of the code that understand different database schemas can simultaneously write to the database.

  • Triggers: Triggers are used to keep old and new schemas in sync while the application undergoes a rolling upgrade.

  • Expand-migrate-contract: The migration is performed in three phases. The expand phase creates new columns (and possibly tables), and triggers. The migrate phase moves data from the old column to the new column. The contract phase removes old columns (and possible tables), and triggers.

#!/bin/bash
set -e
# Cleanup from any previous runs.
mysql -uroot -ppassword -e 'drop database keystone;' || true
git checkout -- .
rm_pyc
# Setup the database.
mysql -uroot -ppassword -e 'create database keystone;'
@dolph
dolph / setup_root.sh
Last active July 18, 2016 18:12
Setup lxd on Ubuntu 15.10 OnMetal node at Rackspace
#!/bin/bash
set -e
apt install -y software-properties-common
apt-add-repository ppa:ubuntu-lxc/stable
apt update
apt dist-upgrade -y
apt install -y lxd
@dolph
dolph / ansible_host_step_1.sh
Last active May 21, 2016 10:57
Deploying rackerlabs/capstone with a CentOS 7 ansible host
#!/bin/bash
set -e
set -x
# Give networking a chance to start.
until curl icanhazip.com ; do sleep 0.1 ; done
# Bootstrap the ansible host.
yum update
yum install -y git
@dolph
dolph / tempest.sh
Last active May 17, 2016 20:50
Tempest quickstart on Ubuntu 14.04
#!/bin/bash
set -e
# Install binary dependencies
sudo sed -i 's%archive.ubuntu.com%pubmirrors.dal.corespace.com%' /etc/apt/sources.list
sudo sed -i 's%security.ubuntu.com%pubmirrors.dal.corespace.com%' /etc/apt/sources.list
apt update
apt install -y build-essential git python-dev libffi-dev libssl-dev
# Install pip