Skip to content

Instantly share code, notes, and snippets.

View ariebrainware's full-sized avatar
🖥️
Golang, Cloud Computing, Digital Infrastructure

Arie Brainware ariebrainware

🖥️
Golang, Cloud Computing, Digital Infrastructure
View GitHub Profile
#!/bin/bash
docker stop shadowbox watchtower && docker rm shadowbox watchtower && sudo bash -c "$(wget -qO- https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.sh)"
@ariebrainware
ariebrainware / protobuf_struct_converter.go
Created March 24, 2022 08:02 — forked from dschowta/protobuf_struct_converter.go
golang: grpc: interface or map type conversion to protobuf struct using protojson .
// Conversion of interface{} or map[string]interface{} types to protobuf struct ("google/protobuf/struct.proto").
package codec
import (
"encoding/json"
structpb "github.com/golang/protobuf/ptypes/struct"
"google.golang.org/protobuf/encoding/protojson"
)
@ariebrainware
ariebrainware / postgres.md
Created January 29, 2022 15:02 — forked from phortuin/postgres.md
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql

Run server:

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
prometheus: k8s
role: alert-rules
name: prometheus-k8s-rules
namespace: monitoring
spec:
groups:
package main
import (
"fmt"
"strings"
"reflect"
"time"
)
func main() {
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "ns-staging",
"labels": {
"name": "staging"
}
}
}
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "production",
"labels": {
"name": "production"
}
}
}
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "development",
"labels": {
"name": "development"
}
}
}
@ariebrainware
ariebrainware / gist:ce6dca66de8f8926c3a097310c2797eb
Created August 26, 2018 11:35
Badges for Galonku Development
[Primary Badges-BackEnd]
https://img.shields.io/badge/version-0.1.0-yellowgreen.svg
https://img.shields.io/badge/content-API-green.svg
https://img.shields.io/badge/section-backend-lightgrey.svg
[Primary Badges-FrontEnd]
https://img.shields.io/badge/version-1.0.0-yellowgreen.svg
https://img.shields.io/badge/content-web--application-ff69b4.svg
https://img.shields.io/badge/section-frontend-lightgrey.svg
@ariebrainware
ariebrainware / AES.c
Created October 24, 2017 03:21 — forked from bricef/AES.c
A simple example of using AES encryption in Java and C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>