Skip to content

Instantly share code, notes, and snippets.

gimmego

Similar to travis-ci/gimme, except a little more robust. Designed for Travis servers.

Choosing a version

There are several schemes:

Explicit versions

@broady
broady / main.go
Last active December 7, 2016 00:50
package main
import (
"flag"
"fmt"
"io/ioutil"
"path"
"path/filepath"
"strings"
"sync"
FROM alpine
RUN apk add --update ca-certificates
COPY app /app
ENTRYPOINT /app
@broady
broady / Dockerfile
Last active December 16, 2016 00:52
FROM alpine
RUN apk add --update ca-certificates
COPY app /app
ENTRYPOINT /app
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
package main
import (
"fmt"
"net/http"
"strings"
"github.com/davecgh/go-spew/spew"
oauth2 "google.golang.org/api/oauth2/v2"
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
FROM golang:1.6.4-alpine
COPY . /go/src/app
RUN go build -o /a.out -tags appenginevm app
CMD ["/a.out"]
@broady
broady / BouncingMarker.java
Last active June 1, 2017 16:44
Dropping Marker animation
final Marker m = mMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.house_flag))
.position(new LatLng(lat, lng)));
final ValueAnimator va = ValueAnimator.ofFloat(20, 1);
va.setDuration(1500);
va.setInterpolator(new BounceInterpolator());
va.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {