Skip to content

Instantly share code, notes, and snippets.

View dkinzer's full-sized avatar

David Kinzer (he/him) dkinzer

View GitHub Profile
@lox
lox / JUnitReporter.php
Created April 21, 2011 18:57
A SimpleTest Reporter that outputs JUnit compatible XML
<?php
/**
* A reporter that writes jUnit xml files
*/
class JUnitReporter extends SimpleReporter
{
private $_dom;
private $_tests=array();
private $_test;
@cwjohnston
cwjohnston / ssh_wrapper.sh.erb
Created June 23, 2011 16:51
an example ssh wrapper script to be used with the chef deploy resource
#!/bin/bash
ssh -i<%= @node[:deploy][:key_path] %>/<%= @appname %>_deploy_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $1 $2
@gavinwilliams
gavinwilliams / build.xml
Created September 7, 2011 10:02
This ant task will automatically clear your Drupal cache with every build/save. Gone are the days of logging into the admin panel to clear the Drupal cache to preview your template or modifying Drupal to get around it!
<!--
1. Download and add drush to your template folder or put it somewhere on your computer and symlink it - http://drupal.org/project/drush
2. Add the following task to your Ant build file after your deployment tasks
3. 'dir' is the path to your local deployment i.e. /Users/yourname/Sites/yourwebsite/public_html
4. 'executable' is the path to your drush command. Simply use drush in this attribute if you have symlinked it
-->
<exec dir="${path.deploy}" executable="${directory.build.tools}/drush/drush" failonerror="true" output="/dev/null">
<arg line="cache-clear all" />
</exec>
@dougireton
dougireton / chef.vim
Created February 8, 2013 06:25
(Broken) chef Syntastic syntax checker
function! SyntaxCheckers_chef_IsAvailable()
return executable('foodcritic')
endfunction
function! SyntaxCheckers_chef_GetLocList()
" let exe = expand(g:syntastic_ruby_exec)
" if !has('win32')
" let exe = 'RUBYOPT= ' . exe
" endif
@SFEley
SFEley / secret.rake
Created April 22, 2013 01:18
Open an encrypted data bag item in one's usual editor, decrypted. Adapted from Aaron Jensen's excellent script: https://gist.github.com/aaronjensen/4123044
namespace :secret do
desc "Edit an encrypted data bag item in EDITOR"
task :edit, :item do |t, args|
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
exit 1
end
abort 'usage: rake "secret:edit[<item name>]"' unless args.item

The person, one Mr Cuntis Yarvin, at the centre of the #lamdaconf debacle performed an Ask Me Anything on Reddit. One of his defenders on Twitter referenced this response from the AMA as proof that he was not racist.

I appreciate that giving more commentary space to this situation provides the oxygen that our protagonist craves. On the other hand I feel like this is sufficiently important to our community to stand up and defend those people that this person seeks to diminish and damage.

So, with that and a deep breath, let's take this response bit by bit and see whether it works out as a defence by the protagonist as evidence of his lack of racism.

Amusingly, my "one offensive comment" was actually me repeating something my wife (not at all a 'shitlady') learned in her MFA program at SF State (not at all a Hitler Youth academy). (This is the observati

@alnutile
alnutile / behat.yml
Created April 10, 2014 10:13
Setting higher command timeout
saucelabs:
extensions:
Behat\MinkExtension\Extension:
default_session: selenium2
base_url: 'http://example.com'
selenium2:
browser: chrome
wd_host: 'USERNAME:TOKEN@ondemand.saucelabs.com/wd/hub'
capabilities:
platform: 'Windows 2012'

The arithmetic mean is a tool of the oppressor

Note: This argument is... not exactly tongue in cheek. I believe it, but I possibly don't hold this view quite as strongly as I'm putting forth.

The problem with the arithmetic mean is that it gives you a view of a population which does not in fact reflect the experiences of any individual member of it.

This is particularly problematic in distributions which are "peaky" in the sense of having their mass concentrated towards the high end of the spectrum. Such distributions are common: In particular power laws and log-normal distributions (log-normal distributions being what you get when you have a large number of small independent multiplicative rather than additive effects) both have this property.

When you apply the arithmetic mean as a way of gauging these distributions you are oppressing the disadvantages.

Moldbug Should Be Sanctioned

I want to start off by saying that I strongly respect John De Goes and the decision he made. If you haven't already read his extensive post about what he did and why he did it, I highly recommend you take the time. His post is thorough and generally persuaded me to his way of thinking, which is not that the works of Moldbug should be accepted or ignored, but that we need to be inclusive of differing beliefs in a community, so long as the holder of those beliefs is willing to "leave them at the door". This is a strong, intellectually defensible and consistent position.

However, as the day has gone on, and I've discussed this issue at length with many members of the community. I have come to the conclusion that this is idealistic, and ultimately missing the point. And as strange as it seems, the point is not that there is a literal Neo Nazi who will be speaking at a well-regarded conference! The point is somehow bigger tha

@alexmcpherson
alexmcpherson / scrape.js
Created September 17, 2012 00:52
Casper.js vimrc scraper
var casper = require("casper").create();
var url = "https://github.com/search?langOverride=VimL&language=&q=vimrc&repo=&type=Repositories&start_value=" + casper.cli.get(0);
var repoLinks = [];
var fileLinks = [];
function getRepoLinks() {
var links = [];
$("div.results .result h2 a").each(function(i,el){
links.push(el.href);
});