Skip to content

Instantly share code, notes, and snippets.

Phill MV phillmv

Block or report user

Report or block phillmv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@phillmv
phillmv / email-filter.js
Created Jan 10, 2019
Google App Script for handling github notifications
View email-filter.js
// email-filter.js
// 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/ee-security-workflows",
"@github/experience-engineering-code",
@phillmv
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 = "https://twitter.com" + tweet.data("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
phillmv / gig-ad-2016-09.md
Last active Sep 28, 2016
Paid design gig with Appcanary
View gig-ad-2016-09.md

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 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 = Class.new(CanaryBase) do
attr_params :param1, :param2
end
View loleui.js
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");
}
View vegetarianism.md

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 Oct 23, 2012
brew for the upload module, mostly from https://gist.github.com/1859950
View nginx.rb
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'
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

View inheritance.js
var FormObject = function(form_id)
{
this.attr_base = "";
var self = {
form_id: form_id,
attr_name: this.attr_base + "[name]",
attr_form_name: this.attr_base + "[form_identifier]",
to_html: function() {
You can’t perform that action at this time.