Skip to content

Instantly share code, notes, and snippets.

View jkmart's full-sized avatar

J. Kerry Martin jkmart

  • Worcester, MA
View GitHub Profile
@antonfisher
antonfisher / allow-privileged-for-microk8s.md
Last active September 24, 2021 09:53
MicroK8s add --allow-privileged=true flag

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

@sukrit007
sukrit007 / docker-compose.yml
Last active August 9, 2018 10:07
Sawtooth-Multi-Node
version: "2.1"
services:
settings-tp:
image: hyperledger/sawtooth-settings-tp:1.0
container_name: sawtooth-settings-tp-default
depends_on:
- validator
entrypoint: settings-tp -vv -C tcp://validator:4004
@mthenw
mthenw / gist:fe8c0b24876c3df3a258635617e826b8
Created September 22, 2017 08:11
systemd mounting and formatting
systemd:
units:
- name: format-ebs.service
command: start
contents: |
[Unit]
Description=Formats EBS /dev/xvdb volume
After=dev-xvdb.device
Requires=dev-xvdb.device
[Service]
@ipbastola
ipbastola / jq to filter by value.md
Last active June 21, 2024 14:29
JQ to filter JSON by value

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active June 25, 2024 12:19
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@leonardofed
leonardofed / README.md
Last active June 17, 2024 14:54
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@nelsnelson
nelsnelson / latency.markdown
Created October 25, 2012 22:07 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Syscall on Intel 5150 ...................... 105 ns
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Context switch on Intel 5150 ............. 4,300 ns  =   4 µs

Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@LeverOne
LeverOne / LICENSE.txt
Created October 24, 2011 04:17 — forked from jed/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE