This file contains hidden or 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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.170043.IKWXXKPFGRPZ5YPLRNQJHDAEJFNGWQKSA.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.176063.BDBSK43E2NJQ40C3PXU1MYUJFQWFHDPPA.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.176169.A1T2FPALR0N5B10RVVAT1TKAAK2DALA4A.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.168320.HQYHCK4E1OJ0SVLCDI1Q0WBASB0W24MOB.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.175958.P3MB3OJLZKBQKSDYITMRWGL2EWH5S4JSA.1.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.168868.IWPSM1CZLZQFO0BBUDBZTTAHZBWP3OXAA.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.168295.BQ5I5QQHYO41JNNRJL0CJUPPUSGV3RRZA.txt | |
/home/petermancini/Downloads/text_without_headers/jeffrey skilling/text_001/3.175721.BLP5EOEWMJUSP2UGVWABK0USJYIT2KULB.1.txt | |
/home/petermancini/Downloads/text_wi |
This file contains hidden or 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
(ns attendance.core | |
(:use karras.core | |
karras.collection | |
karras.sugar | |
compojure.core | |
ring.adapter.jetty | |
hiccup.core) | |
(:require [compojure.route :as route])) | |
(defn home [] |
This file contains hidden or 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
(require 'magit) | |
(defun my-magit-run (&rest args) | |
(apply #'magit-run (cons "git" args)) | |
(message (mapconcat #'identity args " "))) | |
(defun my-magit-hack () | |
(interactive) | |
(let ((working-branch (magit-get-current-branch))) | |
(my-magit-run "checkout" "master") |
This file contains hidden or 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
(ns rabbitmq | |
(:import (com.rabbitmq.client ConnectionParameters | |
ConnectionFactory | |
QueueingConsumer))) | |
(defstruct connection-info | |
:username :password :virtual-host :heartbeat :host :port) | |
(defn connect [info] | |
(let [connection (.newConnection (ConnectionFactory. |
This file contains hidden or 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
# Make sure your run: sudo chmod u+s /usr/bin/screen | |
startup_message off | |
defscrollback 100000 # functionally infinite scrollback | |
# This will allow for multi-user usage | |
# I got all the keys off of the deployment server and added them to my 'pair' user account so no password is needed | |
multiuser on | |
# change cmd from C-a to C-z to avoid emacs conflict | |
escape ^zz |
This file contains hidden or 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
(ns rets | |
(:import (org.apache.http.client HttpClient) | |
(org.apache.http.client.methods HttpGet HttpPost) | |
(org.apache.http.impl.client DefaultHttpClient) | |
(org.apache.http.util EntityUtils))) | |
(use '[clojure.contrib.str-utils]) | |
(def base-url "http://rets.realtracs.net:6103") | |
(def login-path "/rets/login") |
This file contains hidden or 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
def test_refer_physician_no_caller(self): | |
signals.referral_without_caller.disconnect(alerts.referral_without_caller) | |
callback_called = Ref(False) | |
def cb(sender, **kwargs): | |
callback_called(True) | |
signals.referral_without_caller.connect(cb) | |
physician = milkman.deliver(Physician, is_active=True) | |