Skip to content

Instantly share code, notes, and snippets.

View nealmcb's full-sized avatar

Neal McBurnett nealmcb

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nealmcb
nealmcb / get_history.sh
Created October 12, 2020 12:17 — forked from TravelingTechGuy/get_history.sh
Get your Chrome history as a CSV file
#!/bin/bash
# Locate the history file in your profile, and copy it to the same folder as this script.
# On Mac: ~/Library/Application\ Support/Google/Chrome/Default/History
# On Windows: C:\Users\YOUR USER NAME\AppData\Local\Google\Chrome\User Data\Default\History
sqlite3 History <<!
.headers on
.mode csv
.output out.csv
@nealmcb
nealmcb / README.rst
Last active March 18, 2021 14:32
test gist command

GIST

gist edit works!

'gist' is a command line interface for working with github gists. It provides several methods for inspecting a users gists, and the ability to easily create them.

@nealmcb
nealmcb / explore_noom_export.ipynb
Created July 3, 2021 16:11
Explore Noom data export
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nealmcb
nealmcb / syzygy_astropy.py
Created November 23, 2021 02:49
find syzygy / equinox / solstice with astropy
# Find the nearest syzygy (solstice or equinox) to a given date.
# Solution for https://stackoverflow.com/questions/55838712/finding-equinox-and-solstice-times-with-astropy
# TODO: need to ensure we're using the right sun position functions for the syzygy definition....
import math
from astropy.time import Time, TimeDelta
import astropy.coordinates
from scipy.optimize import brentq
from astropy import units as u
@nealmcb
nealmcb / Byte-1978-07-neal-basic-insertion-sort.basic
Last active December 25, 2021 02:40
insertion sort in basic, by Neal McBurnett, July 1978 Byte magazine page 121
100 REM Insertion sort by Neal McBurnett for Byte magazine 1978-07
101 REM from page 121 of https://vintageapple.org/byte/pdf/197807_Byte_Magazine_Vol_03-07_Antique_Mechanical_Computers.pdf
120 print "How many numbers to be sorted?"
130 input n
140 print "Input numbers one at a time"
150 for i = 1 to n
155 dim a(n)
160 input a(i)
170 next i