Skip to content

Instantly share code, notes, and snippets.

View ed-flanagan's full-sized avatar
🚲
Hopefully outside

Ed Flanagan ed-flanagan

🚲
Hopefully outside
View GitHub Profile
@ed-flanagan
ed-flanagan / RacketSICP.Dockerfile
Last active October 2, 2021 00:29
Dockerfile example for Racket & SICP package
FROM debian:bullseye-slim
RUN \
apt-get update \
&& apt-get install --yes --no-install-recommends \
ca-certificates \
libjpeg62-turbo \
libpangocairo-1.0-0 \
openssl \
racket \
#!/bin/sh
# Make sure to fill in your values!!
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
@ed-flanagan
ed-flanagan / Popcorn-Time.desktop
Last active October 31, 2020 10:10
Gnome Popcorn Time application launcher
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Popcorn Time
Name[en_US]=Popcorn Time
GenericName=BitTorrent Stream Player
GenericName[en_US]=BitTorrent Stream Player
Comment=Run the Popcorn Time application
Comment[en_US]=Run the Popcorn Time application
Type=Application
@ed-flanagan
ed-flanagan / geo_distance.cpp
Last active May 22, 2020 13:24
Great-circle distance computational forumlas in C++
/*
* Great-circle distance computational forumlas
*
* https://en.wikipedia.org/wiki/Great-circle_distance
*/
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <cmath>
@ed-flanagan
ed-flanagan / LICENSE
Last active February 19, 2020 01:47
Oren Tirosh’s mnemonic word list
MIT License
Copyright (c) 2019 Ed Flanagan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@ed-flanagan
ed-flanagan / geo_distance.js
Created July 29, 2015 10:40
Great-circle distance formulas in JavaScript
var earth_radius_km = 6371.0;
function deg_to_rad(deg) {
return (deg * Math.PI / 180.0);
}
function haversine_distance(latitude1, longitude1, latitude2, longitude2) {
var lat1 = deg_to_rad(latitude1);
var lng1 = deg_to_rad(longitude1);
var lat2 = deg_to_rad(latitude2);
@ed-flanagan
ed-flanagan / git-flow-breakdown.md
Last active July 17, 2019 08:28 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

git-flow Breakdown

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master
@ed-flanagan
ed-flanagan / res_fix.md
Last active January 28, 2018 16:50
Debian Jessie Mate Resolution Fix for an AMD Radeon Card

Debian Jessie Mate Resolution Fix for an AMD Radeon Card

Note: possibly outdated

How-To

  1. Open /etc/apt/sources.list with your favorite text editor
  2. Change your deb sources so it looks something like this: deb http://http.us.debian.org/debian/ jessie main contrib non-free
    1. The important part is jessie...non-free
  3. Run:
@ed-flanagan
ed-flanagan / install_Spotify.md
Last active December 26, 2017 10:56
Install Spotify Preview on Debian 8 Jessie

Install Spotify Preview on Debian 8 Jessie

Note: Possibly outdated

Note: This is more of a personal reference. You should never install/add keys/libs/programs you yourself don't trust or know are safe.

Check https://www.spotify.com/us/download/linux/ for the official scoop.

Intial Aptitude Install

  1. Add the Spotify repository signing key to be able to verify downloaded packages
#!/usr/bin/env python3
'''Print list of all comics from http://questionablecontent.net/archive.php'''
import csv
import re
import sys
from urllib.error import HTTPError, URLError
from urllib.parse import urljoin