(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
int64_t ipow(int64_t base, uint8_t exp) { | |
static const uint8_t highest_bit_set[] = { | |
0, 1, 2, 2, 3, 3, 3, 3, | |
4, 4, 4, 4, 4, 4, 4, 4, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1 |
FILENAME=$(basename $(pwd)) | |
go test -run=. -bench=. -cpuprofile=cpu.out -benchmem -memprofile=mem.out -trace trace.out | |
go tool pprof -pdf $FILENAME.test cpu.out > cpu.pdf && open cpu.pdf | |
go tool pprof -pdf --alloc_space $FILENAME.test mem.out > alloc_space.pdf && open alloc_space.pdf | |
go tool pprof -pdf --alloc_objects $FILENAME.test mem.out > alloc_objects.pdf && open alloc_objects.pdf | |
go tool pprof -pdf --inuse_space $FILENAME.test mem.out > inuse_space.pdf && open inuse_space.pdf | |
go tool pprof -pdf --inuse_objects $FILENAME.test mem.out > inuse_objects.pdf && open inuse_objects.pdf | |
go tool trace trace.out | |
go-torch $FILENAME.test cpu.out -f ${FILENAME}_cpu.svg && open ${FILENAME}_cpu.svg |
#!/usr/bin/env bash | |
# This script is meant to build and compile every protocolbuffer for each | |
# service declared in this repository (as defined by sub-directories). | |
# It compiles using docker containers based on Namely's protoc image | |
# seen here: https://github.com/namely/docker-protoc | |
set -e | |
REPOPATH=${REPOPATH-/opt/protolangs} | |
CURRENT_BRANCH=${CIRCLE_BRANCH-"branch-not-available"} |
--- | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: > | |
A basic CloudFormation template for an RDS Aurora cluster. | |
Parameters: | |
DatabaseUsername: | |
AllowedPattern: "[a-zA-Z0-9]+" | |
ConstraintDescription: must be between 1 to 16 alphanumeric characters. |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Example Dockerfile | |
FROM hello-world |