Skip to content

Instantly share code, notes, and snippets.


riz automaticalldramatic

Block or report user

Report or block automaticalldramatic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
automaticalldramatic /
Created Nov 11, 2019 — forked from ibraheem4/
Installing Postgres via Brew (OSX)

Installing Postgres via Brew


Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
automaticalldramatic / app.yaml
Last active Sep 6, 2019
A cloudbuild that works for me with private packages
View app.yaml
env: flex
runtime: go1.12
main: cmd/some-service-name/main.go
automaticalldramatic / golang-nuts.go
Last active Sep 3, 2019 — forked from ryanfitz/golang-nuts.go
two ways to call a function every 2 seconds
View golang-nuts.go
package main
import (
// Suggestions from golang-nuts
automaticalldramatic / list-struct.go
Last active Aug 21, 2019
List out all the values in a struct
View list-struct.go
// testing output
reflectedStruct := reflect.ValueOf(event)
// in case you want to list all values stored at the location of this pointer to a struct
if reflectedStruct.Kind() == reflect.Ptr {
reflectedStruct = reflectedStruct.Elem()
automaticalldramatic / channel_demo.go
Last active Aug 18, 2019 — forked from JensRantil/channel_demo.go
Simplification of sample code at Best practise is 1) to inject channels and 2) avoid concurrency in APIs.
View channel_demo.go
func ingest(out <-chan []string) {
out <- []string{"aaaa", "bbb"}
out <- []string{"cccccc", "dddddd"}
out <- []string{"e", "fffff", "g"}
func process(in <-chan []string, out <-chan int) {
for data := range in {
for _, word := range data {
automaticalldramatic /
Created Aug 8, 2019
How to trigger a Kubernetes cronjob manually
kubectl create job --from=cronjob/<name of cronjob> <name of job>
automaticalldramatic / 20140316-205912.go
Created Jul 19, 2019 — forked from ryochack/20140316-205912.go
golang reflection: interface of array
View 20140316-205912.go
package main
import (
func dump_interface_array(args interface{}) {
val := reflect.ValueOf(args)
automaticalldramatic / dump.go
Created Jul 19, 2019 — forked from ahmdrz/dump.go
Golang Reflection Example of an array.
View dump.go
package main
import (
type Test struct {
Name string
View class_decorator.ts
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
automaticalldramatic /
Created Nov 26, 2018
Generating self signed certificates
# Inspired from:
# Output files
# ca.key: Certificate Authority private key file (this shouldn't be shared in real-life)
# ca.crt: Certificate Authority trust certificate (this should be shared with users in real-life)
# server.key: Server private key, password protected (this shouldn't be shared)
# server.csr: Server certificate signing request (this should be shared with the CA owner)
# server.crt: Server certificate signed by the CA (this would be sent back by the CA owner) - keep on server
# server.pem: Conversion of server.key into a format gRPC likes (this shouldn't be shared)
You can’t perform that action at this time.