Skip to content

Instantly share code, notes, and snippets.

@floehopper
floehopper / install.md
Last active Jan 16, 2021
Install rtl-sdr on Raspian on Raspberry Pi
View install.md
jamesmead@floehopper.local:~$ sudo dd bs=1m if=/Users/jamesmead/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/disk2
pi@raspberrypi ~ $ sudo raspi-config
# Choose option 1 to "Expand Filesystem" - Ensures that all of the SD card storage is available to the OS
# Choose Finish & reboot

pi@raspberrypi ~ $ sudo apt-get update
@floehopper
floehopper / zx81-print-hi.bas
Created Nov 22, 2020
ZX81 machine code program to print "HI"
View zx81-print-hi.bas
10 REM 000000000000
20 POKE 16514, 1
30 POKE 16515, 141
40 POKE 16516, 64
50 POKE 16517, 17
60 POKE 16518, 2
70 POKE 16519, 0
80 POKE 16520, 205
90 POKE 16521, 107
100 POKE 16522, 11
@floehopper
floehopper / ec2-iam-security-credentials.md
Last active Nov 7, 2020
Obtaining security credentials derived from IAM role on EC2 machine
View ec2-iam-security-credentials.md
@floehopper
floehopper / install.md
Last active Aug 31, 2020
Installing OSX Catalina from scratch
View install.md

List & install software updates

softwareupdate --list
sudo softwareupdate --verbose --install --all

Set computer name

COMPUTER_NAME="<computer-name>"
sudo scutil --set ComputerName $COMPUTER_NAME
@floehopper
floehopper / install.md
Last active May 23, 2020
Installing OSX Sierra from scratch
View install.md

List & install software updates

softwareupdate --list
sudo softwareupdate --verbose --install --all

Set computer name

COMPUTER_NAME="<computer-name>"
sudo scutil --set ComputerName $COMPUTER_NAME
@floehopper
floehopper / update-git-author-date-and-commiter-date-to-current-time.sh
Last active Feb 17, 2020
Update git author-date and committer-date to current time with 1 second delay between commits
View update-git-author-date-and-commiter-date-to-current-time.sh
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$(date)"; export GIT_AUTHOR_DATE="$(date)"; sleep 1' master..HEAD
@floehopper
floehopper / Vagrantfile
Last active Aug 9, 2019
Ubuntu Xenial with Ruby installed via rbenv
View Vagrantfile
PROVISION_SYSTEM = <<~EOS
set -e
apt-get update --yes
apt-get install --yes gcc
apt-get install --yes make
EOS
PROVISION_USER = <<~EOS
set -e
mkdir -p ~/.rbenv
@floehopper
floehopper / testing_before_filter_in_controller_spec.rb
Created Jul 4, 2019
Testing before_filter in controller spec
View testing_before_filter_in_controller_spec.rb
require 'rails_helper'
RSpec.describe MyController do
describe 'GET #any_action' do
controller do
def any_action
head :ok
end
end
@floehopper
floehopper / Gemfile
Last active Nov 10, 2018
Mocha issue 349
View Gemfile
source 'https://rubygems.org'
gem 'minitest'
gem 'mocha'