Skip to content

Instantly share code, notes, and snippets.

View rakyll's full-sized avatar

Jaana Dogan rakyll

View GitHub Profile
@proppy
proppy / Dockerfile
Last active August 29, 2015 13:57
gce2docker: bootstrap a GCE vm with docker
FROM google/cloud-sdk
RUN apt-get update && apt-get install -y --no-install-recommends curl sshpass netcat-traditional
RUN curl https://get.docker.io/builds/Linux/x86_64/docker-latest -o /bin/docker && chmod +x /bin/docker
RUN curl http://stedolan.github.io/jq/download/linux64/jq -o /bin/jq && chmod +x /bin/jq
ADD gce2docker-fork.sh /
EXPOSE 44243
ENV DOCKER_HOST :44243
ENTRYPOINT ["/gce2docker-fork.sh"]
@proppy
proppy / README.md
Last active August 29, 2015 14:02
gorogoro helps lazy gophers to run their programs in the cloud.
@proppy
proppy / docker-dev.sh
Last active August 29, 2015 14:06
docker-dev: poor man dev workflow for dockerized apps
#!/bin/bash
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@crosbymichael
crosbymichael / gist:fb367ed11c77069d8736
Created December 12, 2014 02:43
Static container for debian jessie
root@services1:~# wget http://crosbymichael.com/debian.jessie && chmod +x debian.jessie
--2014-12-11 21:41:15-- http://crosbymichael.com/debian.jessie
Resolving crosbymichael.com (crosbymichael.com)... 54.231.1.100
Connecting to crosbymichael.com (crosbymichael.com)|54.231.1.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 84455326 (81M) [binary/octet-stream]
Saving to: ‘debian.jessie’
100%[=========================================================================>] 84,455,326 17.9MB/s in 10s
@proppy
proppy / README.md
Last active October 8, 2015 00:39
podlet

podlet pod de lait

"pot-de-lait"

podlet is a tiny CLI tool & daemon to launch kubernetes pods on a bare docker host.

This is a proof of concept, not affiliated to the main kubernetes project, and it only supports a subset of the v1beta3 PodSpec.

Usage

#!/usr/bin/perl
use warnings;
use strict;
my $bin=$ARGV[0];
my @line = split /\s+/, `nm $bin |grep runtime.buildVersion`;
my $addr = hex($line[0]);
my $end = $addr + 16;
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@jordelver
jordelver / gist:3139365
Created July 18, 2012 22:29
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@cpuguy83
cpuguy83 / pull.go
Last active December 9, 2021 06:18
package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/images"
@proppy
proppy / README.md
Last active December 6, 2022 09:32
apk2layer

apk2layer

apk2layer flattens an alpine linux package(s) and its dependencies into a standalone tarball.

Usage

apk2layer [-mirror] PKGNAME... > layer.tar