(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
-- 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%' |
SELECT | |
'SELECT SETVAL(' ||quote_literal(S.relname)|| | |
', MAX(' ||quote_ident(C.attname)|| | |
') ) FROM ' ||quote_ident(T.relname)|| ';' | |
FROM | |
pg_class AS S | |
,pg_depend AS D | |
,pg_class AS T | |
,pg_attribute AS C | |
WHERE |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
var a = '0'; | |
var b = '1'; | |
a == true | |
//false | |
a == false | |
//true | |
b == true | |
//true | |
b == false | |
//false |
#!/usr/bin/env python | |
# | |
# Vkontatke OAuth 2.0 wrapper | |
# Copyright 2011, Adil Khashtamov [[email protected]] | |
# http://khashtamov.kz | |
# | |
# | |
import logging |
''' | |
Python mapping for the Foundation framework. | |
This module does not contain docstrings for the wrapped code, check Apple's | |
documentation for details on how to use these functions and classes. | |
''' | |
import objc as _objc | |
#import ApplicationServices | |
from CoreFoundation import * |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: znc | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: znc initscript | |
# Description: This is the init-Script for znc. | |
### END INIT INFO | |
# Author: Henner M. Kruse |
class BaseRequestHandler(tornado.web.RequestHandler): | |
"""Base class for all SimpleGeo request handlers.""" | |
def _handle_request_exception(self, e): | |
status_code = getattr(e, 'status_code', 500) | |
self.set_status(status_code) | |
error = { | |
'code' : status_code, | |
'message' : str(e) |
[easy_install] | |
index_url = https://pypi.crate.io/simple/ |