Skip to content

Instantly share code, notes, and snippets.

View samalba's full-sized avatar

Sam Alba samalba

View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO
@samalba
samalba / README.md
Last active November 28, 2018 01:18
Demo a testnet of 2 nodes using the github.com/cosmos/sdk-application-tutorial
@samalba
samalba / bl-gitlab-pipeline.yaml
Created December 15, 2020 20:14
Blocklayer Gitlab-CI
staging blocklayer:
stage: staging
environment:
name: staging
image: blocklayer/bl-cli
script:
- bl --stack "staging" --env "staging" push "api"=. --api-key ${BLOCKLAYER_API_KEY} --no-color
except:
- master
@samalba
samalba / cop-stack.sh
Last active February 2, 2021 19:30
Copy a BL stack
#!/bin/bash
if [ "$#" -lt 3 ]; then
echo "Usage: $0 workspace from-stack to-stack"
exit 1
fi
set -eu
stackSrc="$2"
stackTo="$3"
Anonymous "Accept"
Anonymous "Accept-Charset"
Anonymous "Accept-Encoding"
Anonymous "Accept-Language"
Anonymous "Authorization"
Anonymous "Cache-Control"
Anonymous "Connection"
Anonymous "Content-Length"
Anonymous "Content-Type"
Anonymous "Cookie"
@samalba
samalba / pipeline.py
Created November 4, 2022 03:28
Build a Golang api app and containerize it
import anyio
import dagger
async def pipeline(client: dagger.Client):
# Fetch source code from github
source_code = await (
client.git("https://github.com/kpenfound/greetings-api.git")
.branch("main")
.tree().id()