Skip to content

Instantly share code, notes, and snippets.

View scottstanfield's full-sized avatar
🚀
:wq

Scott Stanfield scottstanfield

🚀
:wq
  • Relativity Space
  • California
  • 18:56 (UTC -07:00)
View GitHub Profile
@scottstanfield
scottstanfield / socal-fires.md
Last active January 9, 2025 22:22
SoCal Fire Resources

Apps and Maps

[Watch Duty][1] Single best consumer resource: live fire cameras, evacuation information and aircraft info. I've been a paid member for a couple of years now to unlock some features and support their work. iOS, Android and Web

NASA and NOAA operate the VIIRS satellite fire sensors. Useful for tracking intensity and location of fire. I use these two:

@scottstanfield
scottstanfield / foo.sh
Created May 31, 2017 05:41
restart program when a file changes
#!/bin/sh
# Tested on Ubuntu 16.04. Requires `inotify-tools`
# sudo apt install inotify-tools
# What this does:
# a) run program $1 in the background
# b) kill then restart $1 if file $2 changes
while true; do
$1 &
PID=$!
@scottstanfield
scottstanfield / .zshrc
Last active May 29, 2024 01:45
sensible, minimal .zshrc
# Sensible, short .zshrc
# Gist page: git.io/vSBRk
# Raw file: curl -L git.io/sensible-zshrc
# GNU and BSD (macOS) ls flags aren't compatible
ls --version &>/dev/null
if [ $? -eq 0 ]; then
lsflags="--color --group-directories-first -F"
else
lsflags="-GF"
@scottstanfield
scottstanfield / splash
Created March 11, 2024 17:56
cli splash screen for raspberry pi 5
#!/bin/bash
# vim:filetype=bash:
readonly _D="$(dirname "$(readlink -f "$0")")" && cd $_D
ansi_colors()
{
esc=""
black="$esc[30m"; red="$esc[31m"; green="$esc[32m"
@scottstanfield
scottstanfield / 5-letter-colors.txt
Created September 21, 2016 21:34
A set of 5-letter colors, from A-Z
amber
black
cedar
denim
ebony
folly
grape
hazel
ivory
jaffa
@scottstanfield
scottstanfield / osx-defaults.sh
Created July 18, 2016 03:40
Lots of OSX defaults
#!/bin/sh
# 90% from http://mths.be/osx
# ask for admin password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@scottstanfield
scottstanfield / cornify.js
Created September 5, 2013 14:21
cornify.js: konami code with rainbows and unicorns
// Modified to 'a a' instead of 'b a' due to vimium conflict
// ▲ ▲ ▼ ▼ ◀ ▶ ◀ ▶ a a
// example page: http://yckart.github.io/jquery.konami.js/
//
var kkeys = [], konami = "38,38,40,40,37,39,37,39,65,65";
$(document).keydown(function(e) {
kkeys.push( e.keyCode );
if ( kkeys.toString().indexOf( konami ) >= 0 ){
$(document).unbind('keydown',arguments.callee);
$.getScript('http://www.cornify.com/js/cornify.js',function(){
@scottstanfield
scottstanfield / mount-var-to-new-drive.md
Created November 23, 2021 17:13
Boot from Grub and add new drive for /var partition

Grub boot linux manually (hold shift or ESC)

set pager=1 cat /boot/grub/grub.cfg

set root=(hd0,gpt2) linux /boot/vmlinuz-5.4.0-45-generic root=UUID=0ad8dbaf-6d97-4836-8fa5-612c7e5021c6 ro recovery nomodeset initrd /boot/initrd.img-5.4.0-45-generic boot

@scottstanfield
scottstanfield / mount-var-to-new-drive.md
Created November 23, 2021 17:15
Boot from Grub and add new drive for /var partition

Grub boot linux manually (hold shift or ESC)

set pager=1
cat /boot/grub/grub.cfg

set root=(hd0,gpt2)
linux /boot/vmlinuz-5.4.0-45-generic root=UUID=0ad8dbaf-6d97-4836-8fa5-612c7e5021c6 ro recovery nomodeset
initrd /boot/initrd.img-5.4.0-45-generic
@scottstanfield
scottstanfield / winget-terminal-linux.md
Created May 28, 2021 17:53
Setup Windows Terminal and Debian via WinGet on Windows 10