Skip to content

Instantly share code, notes, and snippets.

Jens Rantil JensRantil

Block or report user

Report or block JensRantil

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
@wallyqs
wallyqs / nkeys-to-trusted-operator.md
Last active Nov 25, 2019
Mixing NKEYS and Trusted Operator setup in NATS v2
View nkeys-to-trusted-operator.md

Mixing both nkeys static config and trusted operator setup (decentralized auth model) is possible but needs some preparation in order to be able to do it.

The way this can be done is by first preparing a basic trusted operator setup that could be used in the future, and then base from that configuration to create the NKEYS static config using the same shared public nkeys for the accounts and then use clustering routes to bridge the two different auth setups during the transition.

For example, creating the following initial setup using NSC:

View Effective_Engineer.md

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@tmaiaroto
tmaiaroto / pre-commit
Last active Jul 30, 2016
A Go Commit Hook for Less Future Headaches
View pre-commit
#!/bin/bash
#
# Check a "few" things to help write more maintainable Go code.
#
# OK, it's fairly comprehensive. So simply remove or comment out
# anything you don't want.
#
# Don't forget to install (go get) each of these tools.
# More info at the URLs provided.
#
@boredzo
boredzo / YYYY.md
Created Oct 26, 2015
Unicode date formats, YYYY?!
View YYYY.md
@chrismdp
chrismdp / s3.sh
Last active Dec 5, 2019
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
View s3.sh
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@tmcgrath
tmcgrath / Spark aggregateByKey
Created Dec 2, 2014
Spark aggregateByKey example
View Spark aggregateByKey
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 1.1.0
/_/
Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65)
Type in expressions to have them evaluated.
Type :help for more information.
@marmbrus
marmbrus / gist:15e72f7bc22337cf6653
Created Nov 27, 2014
Parallel list files on S3 with Spark
View gist:15e72f7bc22337cf6653
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.hadoop.conf.Configuration
case class S3File(path: String, isDir: Boolean, size: Long) {
def children = listFiles(path)
}
def listFiles(path: String): Seq[S3File] = {
val fs = FileSystem.get(new java.net.URI(path), new Configuration())
fs.listStatus(new Path(path)).map(s => S3File(s.getPath.toString, s.isDir, s.getLen))
View cron_helper.sh
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@debasishg
debasishg / gist:8172796
Last active Dec 4, 2019
A collection of links for streaming algorithms and data structures
View gist:8172796
  1. General Background and Overview
You can’t perform that action at this time.