Skip to content

Instantly share code, notes, and snippets.

View tomprogers's full-sized avatar

Tom Rogers tomprogers

  • Minneapolis, MN
View GitHub Profile
@tomprogers
tomprogers / LOGGING.md
Created August 21, 2022 18:58
Logging guidelines

Log levels

Severity Method Appropriate for
MAX mark() a) Temporary only, while developing; never on master or in production
5 fatal() a) Every uncaught exception
4 error() a) Every throw, swallowed or not
3 warn() a) Any debug or info that contains bad news
2 info() a) Side effects after success; b) task progress; see warn
1 trace() a) Upon entry into every routine, sig & values
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 1, 2024 02:05
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@nickcernis
nickcernis / readme.md
Last active March 7, 2024 01:43
Exclude node_modules and .git from Backblaze backups on Mac

Exclude node_modules and .git from Backblaze backups on Mac

  1. Edit the file at /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml.
  2. Add these rules inside the bzexclusions tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
@dannvix
dannvix / electron-main.js
Created June 24, 2015 15:44
Create Electron's BrowserWindow with dynamic HTML content
// main.js for Electron
var app = require("app"),
BrowserWindow = require("browser-window");
app.on("window-all-closed", function() {
app.quit();
})
var mainWindow = null;
app.on("ready", function() {