Skip to content

Instantly share code, notes, and snippets.

View phillmv's full-sized avatar
😅
test string here

Phill MV phillmv

😅
test string here
View GitHub Profile
@phillmv
phillmv / single_sourced_contract.md
Created July 24, 2020 15:39
A letter to Toronto city hall councillors

Hey!

I just heard about this agenda item that went thru the exec: http://app.toronto.ca/tmmis/viewAgendaItemHistory.do?item=2020.EX15.5

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
phillmv / email-filter.js
Last active March 29, 2024 15:13
Google App Script for handling github notifications
// email-filter.js
// Set this up by visiting https://script.google.com/home
// see below for
// CONFIGURATION
// 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
phillmv / extract.js
Created September 22, 2017 16:33
Mass embed twitter threads
// 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 = "https://twitter.com" + tweet.data("permalink-path")
var tdate = tweet.find(".tweet-timestamp").attr("title")
var tcontent = tweet.find(".tweet-text").html()
@phillmv
phillmv / 00_umwelten.rb
Created October 13, 2016 01:31
rails config
#place in config/initializers/
require 'find'
settings_path = File.join(Rails.root, "config/settings")
search_dirs = [settings_path]
files = []
until search_dirs.empty?
@phillmv
phillmv / gig-ad-2016-09.md
Last active September 28, 2016 03:55
Paid design gig with Appcanary

ATTN: Web designers

Hello,

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
phillmv / canary_base_test.rb
Last active April 18, 2016 21:50
Experiment in meta ruby
require 'test_helper'
class CanaryBaseTest < ActiveSupport::TestCase
describe "CanaryBase#initialize" do
it "should handle simple hashes correctly" do
klass = Class.new(CanaryBase) do
attr_params :param1, :param2
end
var React = require('react');
var Eui_button = React.createClass({
handleClick: function(e) {
e.preventDefault();
if(this.props.href !== undefined) {
this.props.href(e);
} 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
phillmv / nginx.rb
Created October 23, 2012 19:53
brew for the upload module, mostly from https://gist.github.com/1859950
require 'formula'
# should prob use http://stackoverflow.com/questions/10665072/homebrew-formula-download-two-url-packages
class Nginx < Formula
homepage 'http://nginx.org/'
url 'http://nginx.org/download/nginx-1.2.4.tar.gz'
sha1 'e3de0b2b82095f26e96bdb461ba36472d3e7cdda'
devel do
url 'http://nginx.org/download/nginx-1.3.7.tar.gz'

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