This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=# explain update messages set notified = false where NOT EXISTS(SELECT * FROM users u INNER JOIN devices d ON u.id = d.user_id WHERE u.id = messages.user_id); | |
QUERY PLAN | |
------------------------------------------------------------------------------------- | |
Hash Anti Join (cost=305.05..9400.07 rows=1 width=219) | |
Hash Cond: (messages.user_id = u.id) | |
-> Seq Scan on messages (cost=0.00..8219.35 rows=175135 width=219) | |
-> Hash (cost=279.28..279.28 rows=2061 width=4) | |
-> Hash Join (cost=86.37..279.28 rows=2061 width=4) | |
Hash Cond: (u.id = d.user_id) | |
-> Seq Scan on users u (cost=0.00..156.20 rows=3220 width=4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Makefile 2013-02-24 20:18:50.000000000 +1300 | |
+++ Makefile 2013-02-24 20:19:04.000000000 +1300 | |
@@ -1,5 +1,3 @@ | |
-INSTALL_BIN = /usr/local/bin | |
- | |
all: | |
$(MAKE) -C src | |
@@ -12,9 +10,7 @@ | |
install: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sys | |
from bs4 import BeautifulSoup | |
import html2text | |
def generate_frontmatter(title, date): | |
return """--- | |
title: %s | |
date: %s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
type direction = Up of int | Down of int | Left of int | Right of int | |
let parseMove (move:string) = | |
let value = int <| move.Substring(1) | |
match move.Substring(0, 1) with | |
| "U" -> Up value | |
| "D" -> Down value | |
| "L" -> Left value |