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
-- Table information like sortkeys, unsorted percentage | |
-- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html | |
SELECT * FROM svv_table_info; | |
-- Table sizes in GB | |
SELECT t.name, COUNT(tbl) / 1000.0 AS gb | |
FROM ( | |
SELECT DISTINCT datname, id, name | |
FROM stv_tbl_perm | |
JOIN pg_database ON pg_database.oid = db_id |
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
#!/usr/bin/env python | |
"""How to do regular expressions in sqlite3 (using python).""" | |
from __future__ import division, absolute_import, print_function, unicode_literals | |
import re | |
import sys | |
import time | |
import datetime | |
import sqlite3 |
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
""" | |
Subscribe to X11 PropertyChange events and print "Window Changed!" when a | |
_NET_ACTIVE_WINDOW property has been changed. | |
Unfortunately no event is received events when _NET_WM_NAME is changed so this | |
would only partially solve https://github.com/dictation-toolbox/aenea/issues/103 | |
You'll have to `pip install python-xlib` to run this script. | |
(Tested with the Cinnamon 2.2.16 desktop) |
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
;; Adapted from https://github.com/rurban/picat-lang/blob/master/picat-mode.el | |
;; mostly the same but this one works.. | |
;; | |
(eval-when-compile | |
(require 'generic) | |
(require 'font-lock) | |
(require 'regexp-opt)) | |
(defmacro picat-match-symbol (&rest symbols) |
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
#!/bin/bash | |
# Replace the repo's default branch with a README explaining this fork is only for its submitted pull requests. | |
set -e -x -o pipefail | |
REMOTE=origin | |
GH_USERNAME="${GH_USERNAME:-$USER}" | |
TRUNK="$(git symbolic-ref --short refs/remotes/$REMOTE/HEAD | sed "s:${REMOTE}/::")" | |
REMOTE_URL="$(git remote get-url $REMOTE)" |
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 java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.ObjectOutputStream; | |
import java.io.OutputStream; | |
import java.io.Serializable; | |
import java.lang.invoke.MethodType; | |
import java.lang.invoke.SerializedLambda; | |
import java.lang.reflect.Method; | |
import java.security.AccessController; | |
import java.security.PrivilegedActionException; |
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 com.google.common.base.Throwables; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandleInfo; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodType; | |
import java.lang.invoke.SerializedLambda; | |
import java.security.AccessController; | |
import java.security.PrivilegedActionException; | |
import java.security.PrivilegedExceptionAction; |