Skip to content

Instantly share code, notes, and snippets.

View rljohnsn's full-sized avatar
🙂

Lance Johnson rljohnsn

🙂
View GitHub Profile
@rljohnsn
rljohnsn / approle.sh
Created January 12, 2024 23:48 — forked from greenbrian/approle.sh
Vault CLI testing AppRole
#!/bin/bash
# start vault
VAULT_UI=true vault server -dev -dev-root-token-id=root -dev-listen-address=127.0.0.1:8200
# login as root - DO NOT DO THIS IN PRODUCTION
vault login root
# write some secrets
vault kv put secret/test color=blue number=eleventeen
@rljohnsn
rljohnsn / kubelet-config-all-options.json
Created November 8, 2023 05:03 — forked from leandrosiow/kubelet-config-all-options.json
These are examples of kubelet-config.json files
{
"kind": "KubeletConfiguration",
"apiVersion": "kubelet.config.k8s.io/v1beta1",
"syncFrequency": "1m0s",
"fileCheckFrequency": "20s",
"httpCheckFrequency": "20s",
"address": "0.0.0.0",
"port": 10250,
"tlsCertFile": "/root/cdk/server.crt",
"tlsPrivateKeyFile": "/root/cdk/server.key",
@rljohnsn
rljohnsn / bash-cheatsheet.sh
Created October 1, 2023 23:28 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
# install and setup minikube
brew install minikube
minikube status

# if you need larger than default 16GB
#minikube start -p v1.15 --kubernetes-version='v1.15.11' --cpus=4 --memory=6000mb --disk-size=20GB

minikube start -p v1.15 --kubernetes-version='v1.15.11' --cpus=4 --memory=6000mb
@rljohnsn
rljohnsn / adfruit-lis3mdl-lsm6ds-combined-example.py
Created August 30, 2020 20:19
Python sample to get accel/magno/gyro readings off of LIS3MDL and LSM6DS
# combined two sample scripts, one for each sensor, into a single example
import time
import board
import busio
import adafruit_lis3mdl
from os import system
i2c = busio.I2C(board.SCL, board.SDA)
sensor1 = adafruit_lis3mdl.LIS3MDL(i2c)
@rljohnsn
rljohnsn / .gitconfig
Last active March 31, 2018 21:38 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Lance Johnson
email = [email protected]
username = rljohnsn
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
/tmp/kitchen/cache/cookbooks/eght_monit/providers/README.md:8: unterminated regexp meets end of file
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/mixin/from_file.rb:42:in `class_eval'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/mixin/from_file.rb:42:in `class_from_file'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/provider/lwrp_base.rb:64:in `build_from_file'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/run_context/cookbook_compiler.rb:244:in `load_lwrp_provider'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/run_context/cookbook_compiler.rb:235:in `block in load_lwrps_from_cookbook'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/run_context/cookbook_compiler.rb:234:in `each'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/run_context/cookbook_compiler.rb:234:in `load_lwrps_from_cookbook'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.5.3/lib/chef/run_context/cookbook_comp
[root@dougu tmp]# rm -f ./testfile && dd if=/dev/zero of=./testfile bs=1G count=1 oflag=dsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 10.4005 s, 103 MB/s
[root@dougu tmp]# rm -f /tmp/testfile && dd if=/dev/zero of=/tmp/testfile bs=1G count=1 oflag=dsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 8.47671 s, 127 MB/s