Skip to content

Instantly share code, notes, and snippets.

View natebrennand's full-sized avatar

Nate Brennand natebrennand

View GitHub Profile
# minimal base image
from alpine:3.16.2
# run a no-op command
RUN echo "testing"
from __future__ import print_function
# [ column id, [list, of, columns, by, (start, end)] ]
# columns are not guaranteed to be contiguous, so there can be one or more
# segments for a column.
layers = [
['A', [(1,26)]],
['B', [(1,27)]],
['C', [(1,28)]],
['D', [(1,29)]],
@natebrennand
natebrennand / README.md
Created November 6, 2020 17:51
Generate SHA's for all rules_go platforms.

rules_go SDK SHA Generator

rules_go maintains support for many platforms. This scripts makes generating the sha256 for all the platforms and buliding the entry to sdk_list.bzl simple. And the calculation is performed directly from the io.Reader so you're not left with 10 archives on disk.

❯❯❯ go run generate.rules.go.shas.go --version=1.15.4
@natebrennand
natebrennand / streaming.median.rs
Created August 25, 2020 04:27
Streaming median calculation
use std::collections::BinaryHeap;
use std::cmp::Reverse;
use std::ops::Add;
use std::convert::From;
#[allow(unused)]
struct RollingMedian<T> {
// 'lower' is data to the left of the median.
lower: BinaryHeap<T>,
@natebrennand
natebrennand / indexes.js
Created June 25, 2018 22:59
Output all the mongo indexes and their sizes for a database
mbSizing = 1024 * 2024
rs.slaveOk();
print("collection,collection size,index,index size,index % of collection");
collections = db.getCollectionInfos();
collections.
filter(function(c) { return c.name !== "system.profile"} ).
Welcome to Strava. We want you to know and understand your rights and our rights relating to the provision of the Services (as defined below). Please review them carefully. Here are a few highlights:
Your privacy is critically important to us. See our Privacy Policy.
You can cancel your membership or deactivate your account at any time.
You own your content, but give us a right to use it.
We expect our members to act with integrity and Stand With Us.
Strava is not liable for your activities and no warranties are made by Strava.
We can cancel your account if you act inappropriately.
We want your feedback, and you allow us to use it.
You agree to arbitrate if there is a dispute between us.

practicing with Node

package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/service/dynamodb"
)

Keybase proof

I hereby claim:

  • I am natebrennand on github.
  • I am natebrennand (https://keybase.io/natebrennand) on keybase.
  • I have a public key whose fingerprint is 9C0B 6B5A 3EEF C956 AFB4 947F 4545 DF55 D19B 63E4

To claim this, I am signing this object:

@natebrennand
natebrennand / keyvee.txt
Last active August 29, 2015 14:20
Final results
This file has been truncated, but you can view the full file.
Failed to read config file: keyvee: No such file or directory
keyvee is an invalid domain identifier (rc=-6)
Parsing config from keyvee.xl
====== PING_INLINE ======
1000000 requests completed in 36.49 seconds
10 parallel clients
20 bytes payload
keep alive: 1
99.14% <= 1 milliseconds