Skip to content

Instantly share code, notes, and snippets.

View brandom's full-sized avatar

Brandon Van Noy brandom

  • medfusion
  • Denton, TX
View GitHub Profile
@brandom
brandom / cron.php
Last active August 29, 2015 14:22
PhpReports Cron Implementation Reference
#!/usr/bin/php
<?php
/* PHP CLI script to handle scheduled reports from php-reports */
require_once 'lib/PhpReports/PhpReportsSwift.php';
$config = include('config/config.php');
try {
@brandom
brandom / cloudSettings
Last active December 23, 2020 17:18
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-23T17:18:27.512Z","extensionVersion":"v3.4.3"}
@brandom
brandom / machine.js
Last active February 17, 2020 23:09
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@brandom
brandom / ajv-validate.js
Created June 15, 2020 21:47
Validate JSON schema using ajv loading remote schemas using fetch
// Validate JSON schema using ajv loading remote schemas using fetch
let schema = {};
let data = {};
const ajv = new Ajv({ loadSchema: loadSchema, format: false });
ajv.compileAsync(schema).then(function (validate) {
var valid = validate(data);
console.log('Valid? ', valid);
console.log('Errors: ', validate.errors);
@brandom
brandom / macos-tmux-256color.md
Created January 25, 2021 22:29 — forked from bbqtd/macos-tmux-256color.md
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):