Skip to content

Instantly share code, notes, and snippets.

View christierney's full-sized avatar

Chris Tierney christierney

View GitHub Profile
@christierney
christierney / Dockerfile
Last active December 21, 2021 19:19
Reprex demonstrating buggy behavior in docker-for-mac on M1 hardware. Attempting to build and run this image from an M1 machine using `--platform Linux/amd64` will result in an "Operation not permitted" error from one of the `initgroups` calls.
FROM ubuntu:bionic-20201119
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
gcc && \
rm -rf /var/lib/apt/lists/*
ARG USER_GID=1001
ARG USER_UID=1001

Keybase proof

I hereby claim:

  • I am christierney on github.
  • I am christierney (https://keybase.io/christierney) on keybase.
  • I have a public key ASAa1y7lubJ2tHNVj6xhDVQtP4eq3IX3IJC0_ZqUpUe7Jgo

To claim this, I am signing this object:

@christierney
christierney / .bash_completion
Last active August 29, 2015 14:16
nodeattr bash-completion
# nodeattr(1) completion
#
# Usage: add to ~/.bash_completion, or install in /etc/bash_completion.d/
# Requires: _upvar _get_comp_words_by_ref _filedir from bash-completion
# Limitations: Successful completion of a query that opens with a quote causes
# a closing quote to be appended automatically, which is annoying if you want
# to add more attributes to the query. I think readline is doing this and I'm
# not sure how to stop it.
# List all nodes.
@christierney
christierney / auth.rb
Created August 7, 2012 23:45
testing basic auth ajax requests
#!/usr/bin/env ruby
# Launch, visit http://localhost:4567, authenticate with admin/secret, and wait.
require 'sinatra'
use Rack::Auth::Basic do |username, password|
username == 'admin' && password == 'secret'
end
get '/' do
@christierney
christierney / gist:2286780
Created April 2, 2012 19:54
Generate an embedded JSON list with arbitrary transformations using JsonBuilder
import groovy.json.*
// A list of things we want to include in our json output.
// Here it's a list of maps, but this could be a list of beans.
things = [[id:2, name:'asdf'], [id:3, name:'foo'], [id:5, name:'bar']]
// JsonBuilder is pretty cool!
def json = new JsonBuilder()
json {