Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View dkinzer's full-sized avatar

David Kinzer (he/him) dkinzer

View GitHub Profile
@eeddaann
eeddaann / test_redis.md
Created July 4, 2018 08:03
Test connection to Redis with netcat

Test connection to Redis with netcat

echo -e '*1\r\n$4\r\nPING\r\n' | nc redis.host.com 6379

@eliotjordan
eliotjordan / marc.go
Last active July 2, 2019 19:47
Process MARC XML with golang
package main
import (
"encoding/xml"
"fmt"
"strings"
"time"
"io/ioutil"
"os"
)
@voidfiles
voidfiles / README.md
Last active August 23, 2021 08:10
A readme for an Ansible Repo

About Ansible

Ansible is configuration management tool and remote orchestration tool. It's kind of like Puppet, and Fabric had a baby. It can get boxes into a desired state like Puppet, but it can also run commands on a bunch of remote boxes like Fabric. It has a few difference from puppet. Namely that it pushes its configuration on demand to boxes instead of having a puppet dameon periodically check for changes and reset things. It also is configured entirely through yaml files that run tasks, instead of having a DSL for managing state.

Ansible is broken down into three major parts. Inventory, Playbooks, and Roles. I will cover these three briefly. Anyone looking for a more in-depth documentation on ansible should checkout the docs.

Inventory

An inventory is a document that describes all of the hosts you want to manage, and how they are grouped. Take a look at our master inventory to get a sense of the structure.

To Block or Not to Block

Defining a Ruby method that can accept either a block or a Proc as an argument1


The problem:

Recently I was trying to refactor some code to make it more testable. The code I wanted to refactor was in a block. But, I wanted to be able to test the block code independently from the method that was using the block.

@tgroshon
tgroshon / contact.html
Created April 10, 2017 17:21
Formatted snippet authored by Jeff Richards (http://www.jrichards.ca/)
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
function submitToAPI() {
var URL = ‘/contact’;
var data = {
name: $(‘#name-input’).val(),
email: $(‘#email-input’).val(),
description: $(‘#description-input’).val()

Setting up Keybase and GitHub signatures

  1. Install Keybase and login
    1. $ brew cask install keybase
    2. $ keybase login
  2. Create a new GPG key on keybase
    1. $ keybase pgp gen --multi
    2. Follow instructions
    3. Note: the email used in the key must match the user email in your ~/.gitconfig
  3. Set up Git to sign all commits
    1. $ gpg --list-secret-keys
@zulhfreelancer
zulhfreelancer / readline_bundle_image_not_found.md
Last active November 3, 2021 20:50
How to fix 'readline.bundle image not found' problem?

If you get error like this:

Running via Spring preloader in process 7662
/Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': dlopen(/Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
  Referenced from: /Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
  Reason: image not found - /Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
	from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
	from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
@nknapp
nknapp / Dockerfile
Created October 30, 2016 20:15
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443

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

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