Skip to content

Instantly share code, notes, and snippets.

View todgru's full-sized avatar

todgru

  • Portland, OR
View GitHub Profile
@todgru
todgru / find-missing-packages.md
Last active March 22, 2023 19:26
recursively find package.json files that are missing a "test" script, exclude "node_modules" from the search
find . -type d -name "node_modules" -prune -o -name "package.json" -type f -exec grep -L '"test"' {} \;
@todgru
todgru / osx-mac-disable-system-sound-effects.md
Created February 10, 2023 18:29
Disable OS X Mac System Sound Effects SILENCE

Disable OS X System Sound Effects

  1. Create a new aiff audio file in GarageBand about a second long, "Share"->"Export..."->"Save as silence.aif"
  1. Save audio file to ~/Library/Sounds.
  2. Open "System Settings" application.
  3. In "Sounds", Select "silence" from drop down list(see screenshot).

system-settings-sounds

@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