Skip to content

Instantly share code, notes, and snippets.

View canuk's full-sized avatar

Reuben Thiessen canuk

  • Stanford University
  • Greater San Diego, CA
  • 23:34 (UTC -07:00)
  • LinkedIn in/reubenthiessen
View GitHub Profile
@canuk
canuk / airports.json
Created October 10, 2023 17:18 — forked from tdreyno/airports.json
JSON data for airports and their locations
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
"woeid": "12512819",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@canuk
canuk / ca.md
Created September 15, 2020 03:45 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@canuk
canuk / Gemfile
Created July 20, 2020 15:23 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@canuk
canuk / userChrome.css
Created July 28, 2019 03:55
userChrome.css file to move the Findbar up to the top right of Firefox, where it belongs.
.browserContainer > findbar {
-moz-box-ordinal-group: 0;
position: fixed !important;
right: 1em;
border: 1px solid threedshadow !important;
border-radius: 0 0 3px 3px;
padding-left: 10px;
/* Hide the "border" at the top by removing the box-shadow and background-image */
border-top: none !important;
@canuk
canuk / application.html.erb
Created October 7, 2018 18:20 — forked from handofthecode/application.html.erb
Rails Ajax Flash Messages
<div id="main" role="main">
<div class="container">
<div class="row">
<div class="span12" id="top-div"> <!--! added "top-div" id to help with ajax -->
<%= render 'layouts/messages' %>
<%= yield %>
</div>
</div>
<footer>
</footer>
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="studio-kura GPX Binder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<name><![CDATA[2018-08-02 19:50:19]]></name>
<trkseg>
<trkpt lat="32.8110736236" lon="-117.1390758734">
<ele>130</ele>
<time>2018-08-03T02:50:20.000Z</time>
</trkpt>
<trkpt lat="32.8110736236" lon="-117.1390758734">
@canuk
canuk / 2018-07-05-KMYF-KMYF.gpx
Created July 6, 2018 18:01
Sunset Flight 7-5-18
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wptx1="http://www.garmin.com/xmlschemas/WaypointExtension/v1" xmlns:gpxtrx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:trp="http://www.garmin.com/xmlschemas/TripExtensions/v1" xmlns:adv="http://www.garmin.com/xmlschemas/AdventuresExtensions/v1" xmlns:prs="http://www.garmin.com/xmlschemas/PressureExtension/v1" creator="" version="1.1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/WaypointExtension/v1 http://www8.garmin.com/xmlschemas/WaypointExtensionv1.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www8.garmin.com/xmlschemas/GpxExtensionsv3.xsd http:/
echo "Hotfix shutdown_php.c and reboot_php.c files"
sed -i.bak 's/usr\/bin/sbin/' ~/smile-pi/setup_files/reboot_php.c
sed -i.bak 's/usr\/bin/sbin/' ~/smile-pi/setup_files/shutdown_php.c
cd /tmp
\cp ~/smile-pi/setup_files/shutdown_php.c /tmp/shutdown_php.c
\cp ~/smile-pi/setup_files/reboot_php.c /tmp/reboot_php.c
gcc -o shutdown_php shutdown_php.c
@canuk
canuk / devmon@.service
Created November 24, 2016 01:32
ArchLinux Service for auto mounting USB drive for SMILEplug
[Unit]
Description=devmon Service
[Service]
Type=simple
User=www-data
# Set DISPLAY for popup dialogs
Environment=DISPLAY=:0
EnvironmentFile=/etc/conf.d/devmon
ExecStart=/usr/bin/devmon --exec-on-device /dev/sdb1 "/etc/nginx/usb_sharing mount 1 %d" --exec-on-remove "/etc/nginx/usb_sharing unmount 1 %d" --exec-on-device /dev/sdc1 "/etc/nginx/usb_sharing mount 2 %d" --exec-on-remove "/etc/nginx/usb_sharing unmount 2 %d"