Skip to content

Instantly share code, notes, and snippets.

Phillip sitharus

Block or report user

Report or block sitharus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sitharus
sitharus / convert.py
Created Jul 26, 2017
Convert static site to markdown/hugo
View convert.py
import os
import re
import sys
from bs4 import BeautifulSoup
import html2text
def generate_frontmatter(title, date):
return """---
title: %s
date: %s
@sitharus
sitharus / homebrew.patch
Created Feb 24, 2013
Patch to make GtkEveMon build under homebrew
View homebrew.patch
--- 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:
View gist:2887417
=# 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)
You can’t perform that action at this time.