Example: Functional Reactive Programming decisively beats Imperative on simplicity, length
The game
Use the Up and Down keys to move the platforms and thus bounce the ball from left to right and back:
The imperative solution
Continue reading →
AWS API: Proper syntax for filtering by tag name and value (e.g. describeInstances)
Continue reading →
Mounting an EBS volume to Docker on AWS Elastic Beanstal
I will describe how to automatically create and mount a new EBS volume (optionally based on a snapshot). If you would prefer to mount a specific, existing EBS volume, you should check out leg100's docker-ebs-attach (using AWS API to mount the volume) that you can use either in a multi-container setup or just include the relevant parts in your own Dockerfile.
The problem with EBS volumes is that, if I am correct, a volume can only be mounted to a single EC2 instance - and thus doesn't play well with EB's autoscaling. That is why EB supports only creating and mounting a fresh volume for each instance.
Continue reading →
OS X: Using scutils to discover whether/what a web proxy is in use
networksetup -getwebproxy
However that does not always work - for example when using "Auto Proxy Discovery" and/or "Automatic Proxy Configuration" with a proxy.pac file.
scutils --proxy
seems to detect all these cases (though it cannot give you the proxy when using auto config, I suppose):
Continue reading →
All-in-one Docker with Grafana, InfluxDB, and cloudwatch-to-graphite for AWS/Beanstalk monitoring
Continue reading →
Hack: Quickly Verify That All Your Mocha/Chai Tests Have Valid Assertions
Anyway, there is a neat quick way to verify that all your tests have at least one valid assertion - simply replace
expect
with expect.not
.
Continue reading →
My Highlights from Continuous Delivery and DevOps Conference 2015
Continue reading →
iTerm coprocess reporting result of (Mocha) tests run via nodemon
Continue reading →
Backup WD MyCloud to S3/Glacier with duplicity (build instructions included)
How does the backup work: duplicity does its job and uploads files to S3. The large data archives are recognized by S3 Lifecycle rules that we set up based on their prefix and moved to the Glacier storage class soon after upload. (It takes hours to restore something from Glacier but its cost is orders of magnitude lower than that of S3 itself). We leave metadata files in S3 so that duplicity can read them.
90% of this is based on http://www.x2q.net/2013/02/24/howto-backup-wd-mybook-live-to-amazon-s3-and-glacier/ and the WD build guide (http://community.wd.com/t5/WD-My-Cloud/GUIDE-Building-packages-for-the-new-firmware-someone-tried-it/m-p/770653#M18650 and the update at http://community.wd.com/t5/WD-My-Cloud/GUIDE-Building-packages-for-the-new-firmware-someone-tried-it/m-p/841385#M27799). Kudos to the authors!
You will need to:
- Build duplicity and its dependencies (since WD Debian v04 switched to page size of 64kB, all pre-built binaries are unusable)
- Configure S3 to move the data files to Glacier after 0 days
- Create your backup script - see
backup-pictures-to-s3.sh
- Schedule to run incremental backups regularly via Cron
- Preferably test restore manually
Continue reading →
AWS CloudWatch Alarms Too Noisy Due To Ignoring Missing Data in Averages
Continue reading →
Git pre-commit hook that fails if "it.only" used (Jest/Jasmine)
Continue reading →
There will be failures – On systems that live through difficulties instead of turning them into a catastrophy
Continue reading →
A Usable Node.js REPL for Emacs
Continue reading →
The Are No Silver Bullets: Which Error Handling Style to Pick For a Given Configuration of Constraints?
Continue reading →
Fix Shell Script Run via SSH Hanging (Jenkins)
ssh machine; machine$ ./script.sh
Continue reading →