Skip to content

Instantly share code, notes, and snippets.

View adcreare's full-sized avatar

David adcreare

View GitHub Profile
@adcreare
adcreare / puppeteerarm64.sh
Last active April 15, 2021 03:50
puppeteer arm64 fix apple m1
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 && npm i # ensure it doesnt try and download a binary
# Modify node_modules/puppeteer/lib/esm/puppeteer/node/Launcher.js
# Specifically remove
// if (os.arch() === 'arm64') {
// chromeExecutable = '/usr/bin/chromium-browser';
// }
and convert following else if to if.
@adcreare
adcreare / example.sh
Created October 17, 2018 09:48
make aws-sdk use aws profiles that maps to role in ~/.aws/config
export AWS_PROFILE=YOURPROFILENAMEhere && export AWS_SDK_LOAD_CONFIG=1
@adcreare
adcreare / npm-beta-publish.md
Last active April 29, 2024 19:21
npm publish a beta package

Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc

  1. Ensure any compile is run npm run dist etc
  2. Modify version in package.json to the following format (match with existing verion numbers etc) "version": "0.1.120-beta.1" where beta.x is the number of those betas
  3. Publish to npm npm publish --tag beta

There are two options for install:

  • Always install beta with npm install packagename@beta
  • Install specific version with npm install package@0.1.120-beta.1
@adcreare
adcreare / gitcommands.md
Last active March 5, 2018 21:18
Handy Git commands

The git commands I always forget!

Branches

  • List all local branches: git branch -a
  • Remove local branch: git branch -d $branchname
  • Cleanup branches that are on your local as remote but aren't remote anymore: git remote prune origin --dry-run (remove --dry-run to do it for real)

Commits

  • add specific lines of a file: git add -i $FILENAME
  • remove last commit (before push): git reset --hard HEAD^
@adcreare
adcreare / .bashrc
Created January 8, 2017 04:10
server .bashrc profile for bashrc with colors
### my added
alias tmux='tmux -2' # for 256color
#alias tmux='tmux -u' # to get rid of unicode rendering problem
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagacad
#username red - hostname yellow text blue highlight - path purple
export PS1='\[\e[01;31m\]\u\[\e[01;0m\]@\[\e[01;33;44m\]\h\[\e[01;0m\]:\[\e[01;35m\]\w\[\e[01;0m\]\$ '
@adcreare
adcreare / .tmux.conf
Created January 7, 2017 05:16
my current tmux config
new-session
splitw -h -p 50
set-option -g mouse on
set -g history-limit 30000
@adcreare
adcreare / keybase.md
Created January 6, 2017 21:25
keybase validation

Keybase proof

I hereby claim:

  • I am adcreare on github.
  • I am commscentral (https://keybase.io/commscentral) on keybase.
  • I have a public key ASDdd5i79ZQUIGgW8KkOVyNcntfRXILiX0tybC30fCwgkAo

To claim this, I am signing this object:

@adcreare
adcreare / .bashrc
Last active August 22, 2017 13:56
Workstation .bashrc additions to get bold terminal and the coloring i like. Works best with OSX and maybe linux mint?
### my added OS X
# make grep output nice
export GREP_OPTIONS='--color=always'
export GREP_COLOR='1;35;40'
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagacad
export PS1='\[\e[01;33m\]\u\[\e[01;0m\]@\[\e[01;32m\]\h\[\e[01;0m\]:\[\e[01;35m\]\w\[\e[01;0m\]\$ '