Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chadfennell's full-sized avatar

Chad M Fennell chadfennell

View GitHub Profile
@chadfennell
chadfennell / load_env.sh
Created December 9, 2021 19:07
Load ENV Variables from 1Password
#!/bin/bash
# 1) Create a Secure Note
# 2) Add a section titled "ENV" (or pick your own title but adjust the script below)
# 3) Add a Password Field (repeat this as many times as you like)
# 4) Replace "password" with your export field name (e.g. AWS_S3_KEY_ID)
# 5) Set the value of the field (e.g. the actual AWS key id)
# 6) tag the item with "exports" (or pick your own tag but adjust the script below)

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

module MyForwardable
def def_delegator(obj, method)
define_method(method) do
self.public_send(obj).public_send(method)
end
end
end
class Dog
def speak
@chadfennell
chadfennell / mpr-mappings.json
Created July 27, 2017 15:51
ETL Hub Mappings for MPR
{
"dataProvider": {
"origins": [
{
"value": "Minnesota Public Radio"
}
]
},
"format": {
"origins": [
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gn="http://www.geonames.org/ontology#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#">
<gn:Feature rdf:about="http://sws.geonames.org/5037657/">
<rdfs:isDefinedBy rdf:resource="http://sws.geonames.org/5037657/about.rdf"/>
<gn:name>Minneapolis, City of</gn:name>
<gn:featureClass rdf:resource="http://www.geonames.org/ontology#A"/>
<gn:featureCode rdf:resource="http://www.geonames.org/ontology#A.ADMD"/>
<gn:countryCode>US</gn:countryCode>
<wgs84_pos:lat>44.96194</wgs84_pos:lat>
<wgs84_pos:long>-93.26694</wgs84_pos:long>
#!/bin/sh
(cd /path/to/solr/here; nohup java -jar start.jar -Xms512m -Xmx2048m -Djetty.port=8000)
check host localhost with address 127.0.0.1
start program = "/bin/bash /where_ever_you_want_to_put_this/restart_solr.sh"
if failed port 8983 protocol http and request "/solr/name_of_your_core_here/admin/ping" for 3 cycles then start
Baseimage Docker - You're Doing Docker Wrong
http://phusion.github.io/baseimage-docker/
class ChessCell
attr_reader :row, :column, :coordinates
def initialize(coordinates)
@row, @column = coordinates
@coordinates = coordinates
end
end
class Queen
attr_reader :attackable, :cell
http://api.dp.la/v2/items?api_key=[DPLA API KEY HERE]&page_size=500&q=%2213th+Amendment%22+OR+%22Aaron+Douglas%22+OR+%22abolition%22+OR+%22Affirmative+Action%22+OR+%22African+Americans%22+OR+%22African+American%22+OR+%22Afro-American%22+OR+%22Alaine+Locke%22+OR+%22Aldridge+Ira%22+OR+%22Alexander+Elizabeth%22+OR+%22Alvin+Ailey%22+OR+%22Amiri+Baraka%22+OR+%22Ann+Petry%22+OR+%22Aretha+Franklin%22+OR+%22August+Wilson%22+OR+%22B.+B.+King%22+OR+%22bell+hooks%22+OR+%22Bessie+Smith%22+OR+%22Beyonce%22+OR+%22Big+Mama+Thornton%22+OR+%22Billie+Holiday%22+OR+%22black+activist%22+OR+%22black+aesthetic%22+OR+%22black+art%22+OR+%22Black+Arts+Movement%22+OR+%22black+athlete%22+OR+%22black+author%22+OR+%22black+band%22+OR+%22black+boy%22+OR+%22black+child%22+OR+%22black+children%22+OR+%22Uncle+Tom%E2%80%99s+Cabin%22+OR+%22black+college%22+OR+%22Prisoner+of+Second+Avenue%22+OR+%22black+community%22+OR+%22black+consciousness%22+OR+%22black+culture%22+OR+%22black+dance%22+OR+%22Black+Freedom%22+OR+%22black+girl%22+OR+%22black+Ha