Skip to content

Instantly share code, notes, and snippets.

View radavis's full-sized avatar

Richard Davis radavis

View GitHub Profile
@radavis
radavis / Reposfile
Created June 8, 2023 16:43
Keep a list of repositories up-to-date, locally.
git@github.com:username/reponame.git
git@gitlab.com:username/another-repo.git
@radavis
radavis / .env.example
Last active December 22, 2021 22:32
Self-hosted GitLab at gitlab.your-hostname.duckdns.org
PUID=1000 # id -u
PGID=1000 # id -g
EXTERNAL_HOSTNAME=your-hostname.duckdns.org
DUCKDNS_TOKEN="" # visit https://www.duckdns.org/ create an account, copy your token
EMAIL=your-email@somewhere.org
GITLAB_HOME=./gitlab
GITLAB_ROOT_PASSWORD=password
@radavis
radavis / tigervnc_start
Last active September 25, 2021 16:45
x11vnc/tigervnc helper scripts
#! /usr/bin/env bash
# apt install tigervnc-common tigervnc-scraping-server tigervnc-standalone-server tigervnc-xorg-extension
x0vncserver \
-display :0 \
-geometry 1024x768+1920+0 \
-passwordfile $HOME/.vnc/passwd
# stop
Windows Registry Editor Version 5.00
;swap caps-lock and escape keys in Windows
;from https://raerav.com/how-to-remap-the-capslock-and-escape-key-in-windows/
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,01,00,01,00,3a,00,00,00,00,00

ubuntu 20.10 notes

problem: "initramfs unpacking failed: Decoding failed" in sudo dmesg --level=err,warn output

try:

$ sudo nano /etc/initramfs-tools/initramfs.conf
COMPRESS=gzip
$ sudo update-initramfs -u -k all
# OS-Installed Font Stacks
https://codepen.io/brianhaferkamp/pen/BLdgjk
```
Serif Fonts
Georgia, serif
'Palatino Linotype', 'Book Antiqua', Palatino, serif
'Times New Roman', Times, serif

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:

#!/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!"