Skip to content

Instantly share code, notes, and snippets.

View todgru's full-sized avatar

todgru

  • Portland, OR
View GitHub Profile
@todgru
todgru / elasticsearch-setup-apple-macbook-pro-m1.md
Created February 9, 2023 23:52
Install Elasticsearch 7.x on Apple Macbook Pro M1 Ventura 13.2

Elasticsearch Setup Apple MacBook Pro M1

Apple MacBook Pro M1, 32 GB, Ventura 13.2

Documentation based on comments in this Github Elasticsearch issue.

Install Homebrew

@todgru
todgru / arch.md
Last active February 6, 2023 20:17
shell determine architecture osx mac
@todgru
todgru / grep.md
Created January 11, 2023 16:51
grep, find occurences system processes that contain one or more strings, any case, ignore case
ps ax |grep -i 'foo\|bar\|biz\|baz\|bim'
@todgru
todgru / bash-env-vars.md
Created November 30, 2022 16:02
Show env var shell bash environment variables
@todgru
todgru / esm-package.md
Created October 7, 2022 20:41 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@todgru
todgru / husky-missing-hooks.md
Created October 5, 2022 15:54
husky missing git hooks not firing pre-commit

Upgrading from husky 3.1.0 to 8x will remove the older style of hooks and set a git config value for hooks. To move back to husky 3x, unset the git core.hookspath=.husky value.

list hooks in git config:

$ git config -l |grep hook
core.hookspath=.husky

Unset core.hookspath:

@todgru
todgru / gmrs-frs-frequencies.md
Last active December 30, 2022 17:48
gmrs frs frequency
Frequency | FRS Channel | FRS Power | FRS Bandwidth | GMRS Power | GMRS Bandwidth | Notes
-----------------------------------------------------------------------------------------
462.5625 MHz 	1 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
462.5875 MHz 	2 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
462.6125 MHz 	3 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
462.6375 MHz 	4 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
462.6625 MHz 	5 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
462.6875 MHz 	6 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
462.7125 MHz 	7 	2 W 	12.5 kHz 	5 W 	20 kHz 	(1)(4)(5)
@todgru
todgru / gfm-images.md
Last active December 30, 2022 17:48
github flavored markdown customizing image width and alt using html tags
<img width="50" alt="Diamond Head, Honolulu, HI and the blue Pacific Ocean" src="https://avatars.githubusercontent.com/u/1738885?v=4">
<img width="100" alt="Diamond Head, Honolulu, HI and the blue Pacific Ocean" src="https://avatars.githubusercontent.com/u/1738885?v=4">
<img width="200" alt="Diamond Head, Honolulu, HI and the blue Pacific Ocean" src="https://avatars.githubusercontent.com/u/1738885?v=4">
<img width="300" alt="Diamond Head, Honolulu, HI and the blue Pacific Ocean" src="https://avatars.githubusercontent.com/u/1738885?v=4">
<img width="400" alt="Diamond Head, Honolulu, HI and the blue Pacific Ocean" src="https://avatars.githubusercontent.com/u/1738885?v=4">
<img width="500" alt="Diamond Head, Honolulu, HI and the blue Pacific Ocean" src="https://avatars.githubusercontent.com/u/1738885?v=4">

50

@todgru
todgru / s3push.sh
Created August 9, 2022 18:42 — forked from ambanmba/s3push.sh
CurlPushToS3
#!/bin/bash
fileLocal="filename.ext"
bucket="name-of-bucket"
s3dir="nameofdirectory/"
region="us-east-2"
storageClass="STANDARD"
awsAccess='XXXXXXXXXXXXXXXXXXXX'
awsSecret='0000000000aaaaaaaaaa0000000000aaaaaaaaaa' #Make sure to use credentials with WRITE access to the bucket
@todgru
todgru / aws-signature-creator.sh
Created August 9, 2022 18:41 — forked from adrianbartyczak/aws-signature-creator.sh
A signature creator for AWS signature version 4
#!/usr/bin/env bash
#
# File:
# aws-signature-creator.sh
#
# Description:
# A signature creator for AWS signature version 4
#
# References:
# https://czak.pl/2015/09/15/s3-rest-api-with-curl.html