Skip to content

Instantly share code, notes, and snippets.

View smolin's full-sized avatar

Steve Molin smolin

View GitHub Profile
@smolin
smolin / keybase.md
Created April 16, 2019 20:34
keybase.md

Keybase proof

I hereby claim:

  • I am smolin on github.
  • I am smolin (https://keybase.io/smolin) on keybase.
  • I have a public key ASBuZfhw-C3bpoChrATlLCDnmsDrUMHLejub1zj01JDaJgo

To claim this, I am signing this object:

[this is public]
thoughts on git
- there are no "branches" it's all a DAG
- there's no "trunk" except by agreement
https://www.theguardian.com/technology/2021/may/08/work-can-virtual-meeting-spaces-save-us-all-from-zoom-fatigue
https://www.ctrl.blog/entry/keepass-vs-bitwarden-server.html
https://github.com/keepassxreboot/keepassxc/blob/develop/docs/man/keoepassxc-cli.1.adoc
https://keepassxc.org/docs/
@smolin
smolin / ansible-adhoc.sh
Last active July 11, 2018 14:53
Wrapper script for ansible-playbook to apply a role to a host without playbook or hosts file.
#!/bin/bash
#
# Originally by Konstantin Suvorov, see for more info:
# https://stackoverflow.com/questions/38350674/ansible-can-i-execute-role-from-command-line
#
# With modifications by Steve Molin
# Number (vs lexical) comparison
if [[ $# -lt 2 ]]; then
@smolin
smolin / notes-gcloud
Last active April 11, 2019 18:10
Notes on Google Compute Engine and gcloud command
list acccelerator types:
gcloud compute accelerator-types list
list configurations:
gcloud config configurations list
thing:
gcloud compute project-info describe
gcloud config list compute/region
@smolin
smolin / nikon-d7500-menus.txt
Last active April 4, 2018 22:49
nikon d7500 menu index
U1 = M with back focus
U2 = ?
U1 = M with back focus
U2 = ?
AF assist light : pencil a9
AF fine-tune : setup 2.4
AF on shutter (back focus) : pencil a6
AF orientation store : pencil a5
@smolin
smolin / notes on packer-terraform-gcloud
Last active December 19, 2017 18:26
notes on packer-terraform-gcloud
# status of various google services
https://status.cloud.google.com
# configurations, cf # cf https://stackoverflow.com/questions/35744901/how-to-change-the-active-configuration-profile-in-gcloud
#
# list known configurations:
gcloud config configurations list
#
# switch to a config:
gcloud config configurations activate MY_OLD_CONFIG
@smolin
smolin / notes on git and github.txt
Last active January 12, 2021 17:43
notes on git and github
# Github
## fatal: The upstream branch of your current branch does not match the name of your current branch.
git branch -u origin/$(git rev-parse --abbrev-ref HEAD)
# Undo
@smolin
smolin / notes on docker-vagrant-gcloud
Last active December 19, 2017 18:26
notes on docker-vagrant-gcloud
# see also https://gist.github.com/smolin/d91b76b0eb84665e0958a1e4cf157e19
(docker build .)
#
# nb: use project ID 'vc-dev-smolin-f263' NOT project name 'vc-dev-smolin':
docker tag alpine gcr.io/vc-dev-smolin-f263/alpine
# docker 'login' against a remote image repo (nb: this isn't really a login in
# traditional sense, it only makes available a credential for use in future
# interactions):
@smolin
smolin / promises_in_nodejs.txt
Last active November 17, 2017 19:59
Promise patterns in node.js
After reading a lot of pages about Promises, this page finally started making sense for me. It's a looong read and quite advanced but there are some good nuggets that help clarify things:
https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html
#. Always end a promise compose chain with
catch(console.log.bind(console))
#. Inside a .then() ALWAYS RETURN OR THROW never let it be 'undefined'
@smolin
smolin / Makefile
Last active February 4, 2023 09:02
configure GCE instance with Nvidia drivers and NoMachine NX
# other options include teradici, paperspace and fram.me
# variables
instance = instance5
image = ubuntu-1604-xenial-v20171107b
# get update to this file
update:
curl -L https://gist.github.com/smolin/ea1f506b74e90bcb729007c50dbe25b7/raw/ > Makefile