Skip to content

Instantly share code, notes, and snippets.

View errordeveloper's full-sized avatar

Ilya Dmitrichenko errordeveloper

View GitHub Profile
> gcloud compute instances create weave-11 --zone europe-west1-b
<...>
> gcloud compute ssh weave-11 --zone europe-west1-b --command 'curl https://get.docker.io/ | sudo bash && curl -L https://raw.github.com/zettio/weave/master/weave | sudo install --mode=0755 /dev/fd/0 /usr/local/bin/weave && sudo weave launch weave-12' ;
<...>
> gcloud compute ssh weave-11 --zone europe-west1-b
Warning: Permanently added '146.148.9.50' (RSA) to the list of known hosts.
@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"

Current state

    attach    Attach to a running container
    build     Build an image from a Dockerfile
    commit    Create a new image from a container's changes
    cp        Copy files/folders from a container's filesystem to the host path
    diff      Inspect changes on a container's filesystem
    events    Get real time events from the server
    export    Stream the contents of a container as a tar archive
    history   Show the history of an image
@errordeveloper
errordeveloper / Dockerfile.build-core-image-minimal
Created September 16, 2014 13:52
Dockerfile snippets for Yocto
FROM gmacario/build-yocto
VOLUME [ "/home/build" ]
USER root
RUN chown build. /home/build
USER build
ENV HOME /home/build
@errordeveloper
errordeveloper / bleach.sed
Created September 9, 2014 10:31
This script is invaluably useful in CI systems when we use some test runners which do not have an option to disable colourful output. source: http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed
#!/bin/sed -rf
s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g
@errordeveloper
errordeveloper / travis.yml
Last active August 29, 2015 14:04
Travis config for a Rust project without `rustup.sh`
language: c
os:
- linux
- osx
matrix:
- os: osx
env: TARGET_TUPLE='x86_64-apple-darwin'
- os: linux
env: TARGET_TUPLE='x86_64-unknown-linux-gnu'
/* automatically generated by rust-bindgen */
pub type __int8_t = ::libc::c_char;
pub type __uint8_t = ::libc::c_uchar;
pub type __int16_t = ::libc::c_short;
pub type __uint16_t = ::libc::c_ushort;
pub type __int32_t = ::libc::c_int;
pub type __uint32_t = ::libc::c_uint;
pub type __int64_t = ::libc::c_longlong;
pub type __uint64_t = ::libc::c_ulonglong;
#!/bin/sh -x
TARGET_TUPLE='x86_64-apple-darwin'
RUST_TARBALL="rust-nightly-${TARGET_TUPLE}.tar.gz"
CARGO_TARBALL="cargo-nightly-${TARGET_TUPLE}.tar.gz"
(cd /tmp; curl -O --retry 3 \
"http://static.rust-lang.org/{dist/${RUST_TARBALL},cargo-dist/${CARGO_TARBALL}}")
#!/usr/bin/env python
#-----------------------------------------------
# Name: fetch_cosm.py
#
# Purpose: retrieve historical hi-res data from cosm
# Usage: ./fetch_cosm.py >>cosm_data.csv
# History:
# Date Author Remarks
# 15Oct2012 RW Created.
#-----------------------------------------------
/*
Xively MQTT example
-Subscribes to Xively feed
-publishes current value to serial monitor
Based on Basic MQTT Example by knolleary
By Calum Barnes, Xively (c) 2013