Skip to content

Instantly share code, notes, and snippets.

View bhoggard's full-sized avatar

Barry Hoggard bhoggard

  • Tristan Media LLC
  • New York, NY
View GitHub Profile
// 4.5.6.1
sealed trait TrafficLight {
def next = this match {
case Red => Green
case Green => Yellow
case Yellow => Red
}
}
case object Red extends TrafficLight
@bhoggard
bhoggard / jrnl-update.sh
Created May 22, 2019 14:44
output format for jrnl updates
jrnl -from yesterday --export json | jq .entries[].title -r | awk '{print "- "$0}'
@bhoggard
bhoggard / disable-notion-avatars.css
Created May 8, 2019 18:30
get rid of those presence avatars moving around the page
.notion-presence-container {
display: none;
}
image: ruby:2.5.1
services:
- postgres:9.5
variables:
POSTGRES_DB: artcat_test
POSTGRES_USER: runner
# Cache gems in between builds
cache:
@bhoggard
bhoggard / collect-art.md
Last active August 9, 2018 18:59
Start collecting art
  • Don't rush to start buying pieces. Spend time looking at a lot of galleries, and browsing Artsy and other art sites to figure out what you like.
  • Here is a calendar of the shows I want to see in NYC: Filterizer.
  • Benefit art auctions are a good way to see a lot of art and get started at a lower price point. One of my favorite benefits each year is at NURTUREart.
  • Our art collection site is http://www.hoggardwagner.org/.
@bhoggard
bhoggard / dpkg.txt
Created August 2, 2018 15:14
artcat aws packages
ubuntu@artcat-vpc-1:~$ dpkg -l | grep magic
ii file 1:5.14-2ubuntu3.1 amd64 Determines file type using "magic" numbers
ii imagemagick 8:6.7.7.10-6ubuntu3.4 amd64 image manipulation programs
ii imagemagick-common 8:6.7.7.10-6ubuntu3 all image manipulation programs -- infrastructure
ii libmagic1:amd64 1:5.14-2ubuntu3.1 amd64 File type determination library using "magic" numbers
ii libmagickcore-dev 8:6.7.7.10-6ubuntu3.4 amd64 low-level image manipulation library - development files
ii libmagickcore5:amd64 8:6.7.7.10-6ubuntu3.4 amd64 low-level image manipulation library
ii libmagickcore5-extra:amd64 8:6.7.7.10-6ubuntu3.4 amd64 low-level image manipulation library - extr
@bhoggard
bhoggard / circleci-config.yml
Created January 3, 2018 02:05
sample ruby config for CircleCI 2.0
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.4.1-node-browsers
@bhoggard
bhoggard / media_display.conf
Created September 13, 2017 00:19
Collective access config file
# --------------------------------------------------------------------------------
media_overlay = {
images = {
mimetypes = {image/gif, image/jpeg, image/tiff, image/png, image/x-dcraw, image/x-psd, image/x-dpx, image/jp2, image/x-adobe-dng, image/x-dcraw, application/dicom},
display_version = tilepic,
alt_display_version = large,
viewer_width = 100%, viewer_height = 100%,
download_version = original,
viewer = TileViewer,
#!/usr/bin/env ruby
# after doing a "gem install wikidata"
require 'wikidata'
artist = Wikidata::Item.find_by_title "Valie Export"
puts "Artist ID is: #{artist.id}"
2017-05-21 1:12:39 - ERROR --> Value South Korean was not set for 240 because it does not exist in list nationalities
2017-05-21 1:13:15 - ERROR --> Value Russian-American was not set for 661 because it does not exist in list nationalities
2017-05-21 1:13:22 - ERROR --> Value South Africa was not set for 703 because it does not exist in list nationalities
2017-05-21 1:13:32 - ERROR --> Value South Africa was not set for 779 because it does not exist in list nationalities
2017-05-21 1:13:41 - ERROR --> Value New Zealander was not set for 831 because it does not exist in list nationalities