Skip to content

Instantly share code, notes, and snippets.

View Gastove's full-sized avatar

Ross Donaldson Gastove

View GitHub Profile

This document -- which has several characters that... usually fail to typeset well -- should export nicely, I hope.

ls -la | grep rc

Export file + pandoc

This document – which has several characters that… usually fail to typeset well – should export nicely, I hope.

ls -la | grep rc

In a glass, combine:

  1. 1oz bourbon whiskey
  2. 1oz whiskey
  3. 1oz bourbon
  4. 2oz bourbon whiskey

Apply to face.

Ye Packing List

  • [ ] Camera and charger
  • [ ] Tablet and charger
  • [ ] ebook and charger
  • [ ] satchel
  • [ ] headphones
  • [ ] two-headphones-at-once dingus
  • [ ] Tiny foam roller
  • [ ] lacrosse ball

Convert JSON for Kara

We wanna go from:

[{"id":"B390","name":"Peanut butter"},{"id":"B204","name":"Flour"},{"id":"B090","name":"Coconut water"}]

Keybase proof

I hereby claim:

  • I am gastove on github.
  • I am gastove (https://keybase.io/gastove) on keybase.
  • I have a public key ASCTvWE2Ovl-OSC-Ullc6bMhQrY8JzjdIouo7rwsqGEm8wo

To claim this, I am signing this object:

Modules

In python, a "module" is a set of related code. We work with modules every time we use import:

import datetime #  <- `datetime` is totally a module
            

SQL

  1. Which food is the most liked?
SELECT food.name
       , COUNT(*) AS love_count
FROM food
LEFT JOIN  preferences AS prefs
ON food.id = prefs.food_id
# Created 2016-04-17 Sun 21:14
#+TITLE: SQL
#+AUTHOR: Ross Donaldson
1. Which food is the most liked?
#+BEGIN_SRC sql
SELECT food.name
, COUNT(*) AS love_count
FROM food
LEFT JOIN preferences AS prefs
ON food.id = prefs.food_id
@Gastove
Gastove / *Org GFM Export*.txt
Last active August 25, 2016 17:54
Installing Postgres
# Installing Postgres
First things first: installing a database. A database is its own kind of
program; it needs to be run and managed separately from the code you write. Both
the SQL and ORM approaches require a database, run in the same way. For our work
here, we'll be using Postgres.
You have two choices: [Postgres.app](http://postgresapp.com/), or homebrew. Both do pretty much the same
thing: install a Postgres database and the `psql` CLI on your computer. Heroku's
Postgres.app makes running your database slightly less arcane; the flip side is