Skip to content

Instantly share code, notes, and snippets.

@johnlauck
johnlauck / canonical-tags.json
Created March 15, 2018 14:22
Tomo Canonical Tags
{
"data": [
{
"id": 1,
"name": "Attractions & Culture",
"public_id": "attractions",
"internal": false,
"enabled": true,
"parent_public_id": null,
"travel_relevance": null,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnlauck
johnlauck / canonical_place.json
Created April 7, 2017 18:30
RT API Examples
{
"data": {
"id": 79037,
"name": "Findlay Market",
"description": "Ohio's oldest continuously operated public market and one of Cincinnati's most cherished institutions. The Market is located just blocks from downtown in Over-the-Rhine, a dense historic neighborhood rich in 19th century architecture. \n\nOpen Tuesday through Sunday, Findlay Market is home year-around to about two dozen indoor merchants selling meat, fish, poultry, produce, flowers, cheese, deli, and ethnic foods. On Thursdays, Saturdays and Sundays from April to November the Market also hosts a thriving farmers market, dozens of outdoor vendors, numerous street performers, and lots of special events.\n\nFindlay Market is a gathering place for people from all over the city. It routinely attracts perhaps the most socially, economically, racially, and ethnically diverse crowds found anywhere in Cincinnati. They come for the sights and sounds and smells of an old-fashioned public market, for the great variety of fabulous fresh foods
@johnlauck
johnlauck / keybase.md
Created April 6, 2017 19:45
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@johnlauck
johnlauck / 0-s3_redirect.md
Last active June 27, 2016 19:53
How to simply redirect an S3 bucket to any URL

Given a vanity/campaign URL, this is the simplest way to provide a server side redirect with 0 infrastucture overhead:

  1. Create a bucket
  2. Open GET access to the bucket as shown below in bucket-policy-example.json (more info available in AWS S3 Static Hosting docs)
  3. Enable website hosting on the bucket
  4. Under Edit Redirection Rules, add XML similar to routing-rules.xml below. Read more about Routing Rules for additional options.
  5. Assign an A record in Route 53 by aliasing the bucket.
@johnlauck
johnlauck / postgres_queries_and_commands.sql
Created June 6, 2016 14:43 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@johnlauck
johnlauck / .gitconfig
Created August 27, 2013 15:06
gitconfig
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[color "branch"]
current = yellow reverse
.sidebar-handle-view {
@include transition(left 300ms);
color: #fff;
position: absolute;
top: 14px;
left: 360px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 24px;
<!-- Discover Ohio http://consumer.discoverohio.com/searchdetails.aspx?detail=55409 -->
<head>
<meta name="keywords" content="Dream Horse Guesthouse (B&amp;B), things to do in Kinsman, (330) 876-0428">
<meta name="description" content="Bring pets/horses! Experience a timber frame barn Bed &amp; Breakfast and gift store in the resort area of Lake Pymatuning State Park (NE Ohio). Horseback riding and/or massage by advance reservation....">
<meta name="listingtype" content="attraction">
<meta name="isSpecialOffer" content="true">
<meta name="Lodging" content="cat">
<meta name="region" content="Northeast">
<meta name="image" content="5279_thumb_10262006135336.jpg">
</head>
>> require 'fastercsv'
require 'fastercsv'
=> []
>> FasterCSV
=> FasterCSV
>> FasterCSV.parse
ArgumentError: wrong number of arguments (0 for 1)
from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1226:in `initialize'
from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1226:in `new'
from /Users/john/.rvm/gems/ree-1.8.7-2010.02/gems/fastercsv-1.5.3/lib/faster_csv.rb:1226:in `parse'