Skip to content

Instantly share code, notes, and snippets.

View cyantarek's full-sized avatar
🏠
Working from home

Cyan Tarek cyantarek

🏠
Working from home
View GitHub Profile
ngrok config add-authtoken 1RECtskEFZlx0tcQ8awS0MU07FB_4WJzqW5jXdmnvckwssKwA
package main
import (
"fmt"
"io/ioutil"
"log"
)
func main() {
f, err := ioutil.ReadFile("download.png")
[log]
level = debug
[rest]
port = 8000
[security]
service_key = "dummy-service-key"
[database]
[10001001 1010000 1001110 1000111 1101 1010 11010 1010 0 0 0 1101 1001001 1001000 1000100 1010010 0 0 0 11000000 0 0 1 110 1000 11 0 0 0 100 11000100 1101010 101000 0 0 1 10111 1010000 1001100 1010100 1000101 1101001 11010111 11100010 11111111 11111111 11111111 0 0 0 11110110 11010010 10100010 1101100 11011110 11101001 1101010 11011010 11100101 1101101 11011111 11101010 11011010 11011010 11011010 11111111 11011010 10101000 1010101 10101110 10110111 11111100 11010111 10100110 11111000 11111000 11111000 11111011 11111011 11111011 11101110 11101110 11101110 11100110 11100110 11100110 11000000 11000000 11000000 1100110 11010000 11011011 11011110 11011110 11011110 11010000 11010000 11010000 1100111 11010010 11011101 1011110 11000001 11001011 11110011 11110011 11110011 1010111 10110010 10111011 10111010 10111010 10111010 1011011 10111011 11000100 10100011 10100011 10100011 1100010 11001001 11010011 111101 1111110 10000101 10011000 10011000 10011000 11001010 11001010 11001010 10110000 10110000 10110000 1000111 10010

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

version: '3'
services:
api:
image: public.ecr.aws/x2y3y7d0/api:latest
restart: always
ports:
- "7000:7000"
proxy:
image: public.ecr.aws/x2y3y7d0/proxy:latest
RANDOM?=$(shell bash -c 'echo $$RANDOM')
DOCKER_HOST?=public.ecr.aws/x2y3y7d0
VERSION?=$(shell git describe --tags --always)
TAG?=latest
# build
build: build-api build-proxy
build-api:
@cyantarek
cyantarek / main.go
Created January 16, 2021 07:54 — forked from salihzain/main.go
Go code to get the name of the function that invoked the current function
package main
import (
"fmt"
"runtime"
)
// whoCalledMe is a function that returns the name, fileName, and lineNumber of the caller that called function X
// the code doesn't check for edge cases
func whoCalledMe() (callerName, callerFileName string, callerLineNumber int) {
#!/bin/sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose