Start up a lambda-like docker container:
docker run -i -t -v /tmp:/var/task lambci/lambda:build /bin/bash
Install some dependencies inside the container:
yum install gperf freetype-devel libxml2-devel git libtool -y
easy_install pip
| /* | |
| * This script will create base62_encode() and base62_decode() in the current schema of a postgresql database. | |
| * Give it a star if you find it useful. | |
| */ | |
| CREATE OR REPLACE FUNCTION base62_encode( long_number bigint ) | |
| RETURNS text | |
| AS $BODY$ | |
| /* | |
| * base62_encode() |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "strconv" |
| DROP FUNCTION IF EXISTS uuid_from_bin; | |
| DROP FUNCTION IF EXISTS uuid_to_bin; | |
| DROP FUNCTION IF EXISTS uuid_v5; | |
| DROP FUNCTION IF EXISTS uuid_v4; | |
| DELIMITER // | |
| CREATE FUNCTION uuid_from_bin(b BINARY(16)) | |
| RETURNS CHAR(36) | |
| BEGIN |
| // This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "golang.org/x/crypto/ssh" |
| package main | |
| import "fmt" | |
| // WithPrefix | |
| type prefixOption struct{} | |
| func WithPrefix() interface { | |
| GetOption |
| FROM golang:1.9 | |
| WORKDIR /go/src/github.com/purplebooth/example | |
| COPY . . | |
| RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go | |
| FROM scratch | |
| COPY --from=0 /go/src/github.com/purplebooth/example/main /main | |
| CMD ["/main"] |
| <? | |
| // | |
| // [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
| // by @levelsio | |
| // | |
| // 2017-08-23 | |
| // | |
| // 1) buy $40/day BTC | |
| // 2) buy $10/day ETH | |
| // |
| '.source.go': | |
| 'Options': | |
| 'prefix': 'options' | |
| 'body': ''' | |
| // Option function. | |
| type Option func(*$1) | |
| // New with the given options. | |
| func New(options ...Option) *$1 { |
| package main | |
| import ( | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| "math/big" | |
| ) |