Skip to content

Instantly share code, notes, and snippets.

# Remove docker containers by image name
docker ps -a -f ancestor={image name here} | cut -c 1-12 | tail -n +2 | xargs docker rm
# Clean the one time containers
docker container ls -a -q --filter=\"name=_run_\" | xargs docker rm

Keybase proof

I hereby claim:

  • I am harrisong on github.
  • I am tplawyer (https://keybase.io/tplawyer) on keybase.
  • I have a public key ASArnzPIh1YWTkQcT1PNX6E441Sz9MShZSW0ERWRGA2m5wo

To claim this, I am signing this object:

@harrisong
harrisong / nulldb_json_support.rb
Created March 2, 2018 01:26
Add json and jsonb support for Nulldb
# Force TableDefinition so that we can parse scheme.rb with :json and :jsonb as column type
module ActiveRecord
class ConnectionAdapters::NullDBAdapter::TableDefinition
def jsonb(name, options = {})
column_definition = ActiveRecord::ConnectionAdapters::ColumnDefinition.new
column_definition.name = name
column_definition.type = :jsonb
@columns_hash[name] = column_definition
end
@harrisong
harrisong / 2014_camera.h
Last active August 29, 2015 14:01
Reconfig
/*
* 2014_camera.h
* Config file for 2014 Gen 1 board (camera car)
*
* Author: Ming Tsang
* Copyright (c) 2014 HKUST SmartCar Team
*/
#ifndef LIBSC_2014_CAMERA_H_
#define LIBSC_2014_CAMERA_H_