Skip to content

Instantly share code, notes, and snippets.

phillmv /
Created Jul 24, 2020
A letter to Toronto city hall councillors


I just heard about this agenda item that went thru the exec:

Professionally, I'm a software engineer and entrepreneur. I don't have the time to evaluate this deal in detail but this has a weird smell to it. Questions that come to mind:

  1. Why single sourced? What's the rush? This doesn't have a COVID timeline.

  2. Contra staff, the city actually does hold a lot of risk. The contract may expire in three years, but replacing an integration that replaced 22 existing payment processes will be a significant, many-months-long project that can easily cost (a few) millions of dollars. Once we're in, it will be a lot harder to leave!

phillmv / email-filter.js
Last active Jan 8, 2020
Google App Script for handling github notifications
View email-filter.js
// email-filter.js
// Set this up by visiting
// see below for
// begin things you can change or should know about:
// list the teams you care about here:
// the script will search email messages for these specific
// mentions
var myTeams = [ "@github/pe-security-workflows" ]
phillmv / extract.js
Created Sep 22, 2017
Mass embed twitter threads
View extract.js
// Open the Chrome inspector, and select the topmost div containing the twitter thread.
// You might want to open the first tweet in the thread, scroll down to load every item in the thread, then select the parent container
var foo = document.createElement("div");
var str = ""
$($0).find(".tweet").each(function(i, t) {
var tweet = $(t);
var turl = "" +"permalink-path")
var tdate = tweet.find(".tweet-timestamp").attr("title")
var tcontent = tweet.find(".tweet-text").html()
View 00_umwelten.rb
#place in config/initializers/
require 'find'
settings_path = File.join(Rails.root, "config/settings")
search_dirs = [settings_path]
files = []
until search_dirs.empty?
phillmv /
Last active Sep 28, 2016
Paid design gig with Appcanary

ATTN: Web designers


We are looking to hire, for a short gig, a competent web designer.

We have a lot of dense chunks of information that needs to be succintly communicated to our customers, and while we're rather good at putting websites together, making them that extra 👌 is hard.

This is where you come in. We have a specific two-week project to start, but are looking to develop a long-term relationship with the right person.

phillmv / canary_base_test.rb
Last active Apr 18, 2016
Experiment in meta ruby
View canary_base_test.rb
require 'test_helper'
class CanaryBaseTest < ActiveSupport::TestCase
describe "CanaryBase#initialize" do
it "should handle simple hashes correctly" do
klass = do
attr_params :param1, :param2
View loleui.js
var React = require('react');
var Eui_button = React.createClass({
handleClick: function(e) {
if(this.props.href !== undefined) {
} else {
$(React.findDOMNode(this)).tooltip({title: "Sorry! Not yet."}).tooltip("show");

so, turns out that it's becoming increasingly awkward to ignore plant intelligence;

whereas before we sort of took them to be these weird, dumb things that grew out of the ground, more and more there's a reasonable argument to be made that they probably just operate on a longer timescale to the point where it's probably reasonable to attribute sentience to them

(they respond and make decisions according to their environment; they remember stimuli, they communicate with other plants, just on a timeframe of say days and weeks rather than a few minutes)

so fine so dandy, pretty neat, turns out we're really not all that special

my question then, tho, is what does this do to the question of animal rights/vegetarianism?

phillmv / nginx.rb
Created Oct 23, 2012
brew for the upload module, mostly from
View nginx.rb
require 'formula'
# should prob use
class Nginx < Formula
homepage ''
url ''
sha1 'e3de0b2b82095f26e96bdb461ba36472d3e7cdda'
devel do
url ''
View gist:3923692

Nota bene: I am likely to get many details wrong, caveat emptor.

security - A security is a financial product that pools together contractual debt. Certain kinds of debt are desirable investments; they pay interest rates at varying degrees of interest/risk.

If you are a money manager for some kind of fund, like say a pension plan or a 401k, you may like the risk profile of a certain class of debt, but you can't invest in it directly because you're not in the business of handing out millions of, say, car loans.

So, you talk to an investment bank. An investment bank will buy thousands of loans and, for instance, create a holding company whose sole assets are those loans. You then buy shares in that holding company for $x dollars, and over time – as the debtors pay back their loans - the holding company will issue back dividends until you've made back your investment and the interest.

The securitzation process is seen to diminish the risk of investing in a given kind of loan, and allows people to make