Skip to content

Instantly share code, notes, and snippets.

Pre:

  • Create a s3 repo to contain the cluster state.
  • Create a Route53 domain and hosted zone.

Create a cluster definition

kops create cluster --name=demo.simplepipeline.xyz\
     --node-size=t2.micro\
     --state=s3://k8s-demo-simplepipeline.xyz\
     --zones=eu-west-1a\
# build stage
FROM golang:alpine AS build-env
ADD . /src
RUN cd /src && go build -o goapp
# final stage
FROM alpine
WORKDIR /app
COPY --from=build-env /src/goapp /app/
ENTRYPOINT ./goapp
@pedrodelgallego
pedrodelgallego / dabblet.css
Created April 27, 2013 13:24
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@pedrodelgallego
pedrodelgallego / dabblet.css
Created April 27, 2013 13:24
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
<svg xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" width="400" height="400" viewbox="0 0 400 400">
<metadata>
<rdf:rdf>
<dc:format>
image/svg+xml
</dc:format>
<dc:title>
Life expectancy 2007
</dc:title>
<dc:creator>
window.db = db || {};
db.movies = [
{Title: "Pulp Fiction", Year: "1994", Rated: "R", Released: "14 Oct 1994", Runtime: "2 h 48 min", Genre: "Crime, Thriller", Director: "Quentin Tarantino", Writer: "Quentin Tarantino, Roger Avary", Actors: "John Travolta, Uma Thurman, Samuel L. Jackson, Bruce Willis", Plot: "The lives of two mob hit men, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption.", Poster: "http://ia.media-imdb.com/images/M/MV5BMjE0ODk2NjczOV5BMl5BanBnXkFtZTYwNDQ0NDg4._V1_SX300.jpg", imdbRating: "9.0", imdbVotes: "727,482", imdbID: "tt0110912", Type: "movie", Response: "True"},
{Title: "Reservoir Dogs", Year: "1992", Rated: "TV-MA", Released: "23 Oct 1992", Runtime: "1 h 39 min", Genre: "Crime, Thriller", Director: "Quentin Tarantino", Writer: "Quentin Tarantino, Roger Avary", Actors: "Harvey Keitel, Tim Roth, Michael Madsen, Chris Penn", Plot: "After a simple jewelery heist goes terribly wrong, the surviving criminals begin to suspect th
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 21, 2013 11:29 — forked from LeaVerou/dabblet.css
iOS 6 style switch checkboxes
/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 21, 2013 11:29
Hexagon kitty - By @LeaVerou
/* Hexagon kitty - By @LeaVerou
Disappointingly inflexible, but still interesting methinks.
*/
.hexagon {
display: inline-block;
position: relative;
width: 200px;
height: 200px;
transform: scale(1.25,.707) rotate(-45deg);
@pedrodelgallego
pedrodelgallego / dabblet.css
Created March 21, 2013 11:28 — forked from LeaVerou/dabblet.css
Hexagon kitty - By @LeaVerou
/* Hexagon kitty - By @LeaVerou
Disappointingly inflexible, but still interesting methinks.
*/
.hexagon {
display: inline-block;
position: relative;
width: 200px;
height: 200px;
transform: scale(1.25,.707) rotate(-45deg);