Skip to content

Instantly share code, notes, and snippets.

Avatar

Dorian Taylor doriantaylor

View GitHub Profile
@doriantaylor
doriantaylor / motion-cron.sh
Created Aug 7, 2022
cron script to turn your security camera on and off based on the presence of your phone on the wifi
View motion-cron.sh
#!/bin/bash
# This assumes you have https://motion-project.github.io/ installed.
# It also assumes this machine is on the same LAN as your phone.
# Put this script in root's crontab; set it to run every minute.
#
# Copyright 2022 <https://doriantaylor.com/person/dorian-taylor#me>
# License Apache-2.0 <https://www.apache.org/licenses/LICENSE-2.0>
# Change this to your phone's mac address
@doriantaylor
doriantaylor / rewrite-proxy.rb
Created Apr 26, 2022
script to use in rewrite map for aliased subdomains
View rewrite-proxy.rb
#!/usr/bin/env ruby
require 'time'
require 'pathname'
require 'uri'
NULL = 'NULL'.freeze
RECHECK = 5 # how many seconds to wait before stat()
class RewriteProxy
@doriantaylor
doriantaylor / scrape-pool-schedule.rb
Created Mar 13, 2022
scrape university of toronto pool schedule
View scrape-pool-schedule.rb
#!/usr/bin/env ruby
require 'date'
require 'time'
require 'mechanize'
# do this or it complains
require 'active_support/isolated_execution_state'
# wah wah wah crybaby
require 'icalendar'
require 'icalendar/tzinfo'
@doriantaylor
doriantaylor / threadapalooza.pl
Created Dec 18, 2019
this is what was used to get @vgr's threadapalooza
View threadapalooza.pl
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use Storable ();
use Math::BigInt ();
use JSON ();
use Path::Class ();
use Net::Twitter ();
View keybase.md

Keybase proof

I hereby claim:

  • I am doriantaylor on github.
  • I am dorian (https://keybase.io/dorian) on keybase.
  • I have a public key whose fingerprint is 4028 9B91 4C4C 03D3 92B0 D87F 8AB1 4A3B 7D8D AFA3

To claim this, I am signing this object: