kubectl create job --from=cronjob/<name of cronjob> <name of job>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// Suggestions from golang-nuts | |
// http://play.golang.org/p/Ctg3_AQisl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func ingest(out <-chan []string) { | |
out <- []string{"aaaa", "bbb"} | |
out <- []string{"cccccc", "dddddd"} | |
out <- []string{"e", "fffff", "g"} | |
close(out) | |
} | |
func process(in <-chan []string, out <-chan int) { | |
for data := range in { | |
for _, word := range data { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func dump_interface_array(args interface{}) { | |
val := reflect.ValueOf(args) | |
fmt.Println(val.Kind()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Test struct { | |
Name string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/bin/bash | |
# Inspired from: https://github.com/grpc/grpc-java/tree/master/examples#generating-self-signed-certificates-for-use-with-grpc | |
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
"""A post-update Git hook to execute `composer install` when composer.json changes | |
:Author: Cody Halovich | |
:Company: HootSuite Media Inc. | |
""" | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gitflow.branch.master The name of the branch treated as master. Default: master. | |
gitflow.branch.develop The name of the branch treated as develop. Default: dev. | |
gitflow.prefix.feature The prefix for feature branches. Default: feature/. | |
gitflow.prefix.release The prefix for release branches. Default: release/. | |
gitflow.prefix.hotfix The prefix for hotfix branches. Default: hotfix/. | |
gitflow.prefix.support The prefix for support branches. Default: support/. | |
gitflow.prefix.versiontag The prefix for version tags. Default: empty. | |
gitflow.origin The name of the remote treated as origin. Default: origin. |