Skip to content

Instantly share code, notes, and snippets.

@errordeveloper
errordeveloper / setup.md
Created November 11, 2012 20:41 — forked from 17twenty/gist:2712354
Setting-up Yocto for MACHINE=beaglebone

Checkout repositories

  1. Poky
git clone git://git.yoctoproject.org/poky && cd poky
  1. OE metadata layers
@errordeveloper
errordeveloper / cosm_site_speed_test.sh
Created April 17, 2012 15:15
Test you site response times with Cosm!
#!/bin/bash
MY_SITE='https://google.com'
API_KEY='TDRs3afRG7as8_QIAdMsG6TX-h4vOnAlCjZ57v1ItnY'
FEED_ID='55938'
#EXTRA_FLAGS='--verbose --location'
response_test () {
@errordeveloper
errordeveloper / Unicorn_and_Upstart.md
Last active February 9, 2022 09:21
Upstart config for a Rails app using Unicorn HTTP server

Using Unicorn with Upstart

This configuration works with Upstart on Ubuntu 12.04 LTS

The reason why it needs to be done this way (i.e. with the pre-start and post-stop stanzas), is because Upstart is unable to track whever Unicorn master process re-execs itself on hot deploys. One can use it without hot-deploys and run Unicorn in foreground also, it then only needs one exec stanza.

This presumes you are not using RVM, so no voodoo dances.

@errordeveloper
errordeveloper / Swarm.md
Last active March 27, 2021 15:03
A quick guide to using Weave Net with Docker Swarm

Weave Net and Docker Swarm

This example show how-to setup a very simple Swarm cluster enabled with Weave Net.

## Infratructure

There are two hosts that have a recent version of Docker Engine running.

These hosts are named host1 and host2, and might have the following in /etc/hosts or you just substitute IP addresses in the commands shown below.

@errordeveloper
errordeveloper / _notes.md
Created July 8, 2012 14:14
Building Rowboat (ICS) for BeagleBone on Mac OS X 10.7

Initialising

A case-sensitive volume is required:

hdiutil create -type SPARSE -volname 'Rowboat' -fs 'Case-sensitive Journaled HFS+' -size 40g rowboat.dmg.sparseimage
hdiutil attach ~/rowboat.dmg.sparseimage

To avoid some extra/unnecessary patching, make sure you have GNU versions of tar and sed ahead of your path.

# create an new direcotry with a very simple dockerfile
$ mkdir quay-issue && cd mkdir quay-issue
$ echo 'FROM scratch' > Dockerfile
# buildx auto-push only works with a builxkit driver, so we need to create a builder instance
$ docker buildx create --use
gifted_lewin
# try building and pushing to docker.io
$ docker buildx build --push --tag "docker.io/errordeveloper/gke-test-cluster-job-runner-init:e8e34968c060a23cfbfb27012d38e5ccbd3e27fe-dev-wip" .
[+] Building 2.9s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
@errordeveloper
errordeveloper / serve-pde-preproc-simple.js
Created September 30, 2011 18:42
A simple Node.js script to instantly server Processing sketches as Processing.js :)
/** A simple Node.js script to instantly serve
* Processing source code as Processing.js :)
*
* This is an enhanced version which pre-procs
* the code, so each of the clients does not
* have to translate the PDE Java code into
* PJS. The server will re-load the file only
* if it has changed, in the first version
* that had been reloaded on each GET request!
*
@errordeveloper
errordeveloper / config.yaml
Last active September 9, 2019 01:31
Weave on CoreOS
#cloud-config
write_files:
- path: /etc/weave.core-01.env
permissions: 0644
owner: root
content: |
WEAVE_LAUNCH_ARGS=""
PINGER_LOCAL="10.0.1.1/24"
PINGER_REMOTE="10.0.1.2"
GREETER_ADDRESS="10.0.2.1/24"
rm /var/db/BootCache.playlist /var/db/volinfo.database /var/db/.AppleSetupDone
rm /var/vm/swap*
#!ipxe
set base-url http://192.168.0.5
kernel ${base-url}/homebox-kernel initrd=homebox-initrd.img console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0
initrd ${base-url}/homebox-initrd.img
boot || goto local
:local
kernel /boot/homebox-kernel initrd=homebox-initrd.img console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0