Skip to content

Instantly share code, notes, and snippets.

/*
create tables
*/
create table sources (
id integer primary key autoincrement,
name string not null
);
create table bags (
create table demo (
id int,
useless int,
b boolean
) partition by range (id);
alter table demo drop column useless;
-- only seems to cause failure when it's a partial index on b.
create index on demo(b) where b = 't';
create table demo (
id int,
useless int,
d timestamp,
b boolean
) partition by range (id, d);
alter table demo drop column useless;
-- only seems to cause failure when it's a partial index on b.
package main
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
)
func main() {
In [7]: rows = c.query("people{a foobar}")
In [8]: rows.next()
---------------------------------------------------------------------------
PQLParseError Traceback (most recent call last)
<ipython-input-8-db4151b65ded> in <module>()
----> 1 rows.next()
/home/wyatt/go/src/github.com/wkalt/pql/python/pqlpy/client.py in query(self, pql)
52 params = urllib.urlencode({"query": pql})

streaming-demo

This is a demonstration of a suspected bug/oddity in the Clojure compiler. Run the demo with

lein run server-headless

This starts the service with a 64mb heap, to exacerbate the issue.

curl -X GET http://localhost:3000/stream

{
"jvm.attribute.name": {
"type": "gauge",
"value": "10787@updog"
},
"jvm.attribute.uptime": {
"type": "gauge",
"value": 22641
},
"jvm.attribute.vendor": {
@wkalt
wkalt / repro.tf
Created September 15, 2018 18:39
provider "aws" {
region = "us-west-2"
}
resource "aws_iam_user" "bucket_owner" {
name = "bucket_owner"
}
resource "aws_iam_user" "bucket_reader" {
name = "bucket_reader"
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as
# /etc/udev/rules.d/81-thinkpad-dock.rules
# These values seem to work for "ThinkPad Mini Dock Plus Series 3"
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR_ID}=="17ef", ENV{ID_MODEL_ID}=="1010", RUN+="/usr/bin/thinkpad-dock.sh"
#!/bin/bash -e
## not sure if needed
# sleep 0.1
username=wyatt
if [[ "$ACTION" == "add" ]]; then
DOCKED=1
logger -t DOCKING "Detected condition: docked"
elif [[ "$ACTION" == "remove" ]]; then