Skip to content

Instantly share code, notes, and snippets.

View radavis's full-sized avatar

Richard Davis radavis

View GitHub Profile

ThinkPad X1 Carbon gen 7 Audio

$ lspci
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)

$ sudo lspci -v -s 00:1f.3
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11) (prog-if 80)
        Subsystem: Lenovo Cannon Point-LP High Definition Audio Controller
 Flags: bus master, fast devsel, latency 64, IRQ 165
@radavis
radavis / logger.js
Created November 6, 2020 22:05
Morgan, Winston configuration for Express
const winston = require('winston')
const morgan = require('morgan')
const { name: packageName } = require('./package')
const {
LOG_CONSOLE,
LOG_FILE,
LOG_LEVEL,
NODE_ENV
} = process.env

Keybase proof

I hereby claim:

  • I am radavis on github.
  • I am radavis (https://keybase.io/radavis) on keybase.
  • I have a public key ASCxVK16zCJL8SOb8whL-IXhfOAv3LVXJ4n_oTw_ZBunXQo

To claim this, I am signing this object:

The Path from Idea to Software

User Story -> Acceptance Criteria -> Feature Test

Generic User Story

As a ...
I want ...
So that ...
#!/bin/bash
git diff --name-only --cached | grep -q package-lock.json
pkglock_staged=$?
git diff --name-only --cached | grep -q package.json
pkgjson_staged=$?
if [[ "$pkglock_staged" -eq 0 && "$pkgjson_staged" -eq 1 ]]; then
echo "attempted commit of package-lock.json without changes to package.json!"
@radavis
radavis / instructions.md
Last active August 29, 2018 19:48 — forked from jacksy40/instructions.md
Capybara/RSpec/Poltergeist. How to run javascript in your Rails test suite.

install phantomjs

brew install phantomjs

Gemfile:

group :test do
  gem 'poltergeist'
 gem 'database_cleaner'
@radavis
radavis / cli.md
Last active February 12, 2018 15:19

Using the OS X Command Line

Directory Shortcuts

~ - Home Directory
. - Current Directory
.. - Enclosing Directory
/ - Root Directory

Logs

Log levels

From 0 to 5 in severity:

  • debug - for debugging purposes, only
  • info - an informative message
  • warn - this may or may not be an issue
  • error - this is an issue, but the application can continue running

Raspberry Pi Kiosk

Instructions to go from zero to a Raspberry Pi Kiosk displaying a webpage with auto-refresh.

  • OS: Raspbian (Debian Wheezy) 2015-02-16
  • Browser: IceWeasel

Copy Raspbian to a SD Card (on OSX)

Instructions for other OSes.

Objectives and Key Results (OKRs)

OKRs should be directly linked to the company's strategy.

Key Results are (a) outcome based, or (b) output based.

Answers the question: "How, as a group, will we consider our company successful?"

OKRs for software engineers