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
\set QUIET 1 | |
\set ON_ERROR_ROLLBACK interactive | |
\set VERBOSITY verbose | |
/* psql escape codes: | |
%M - full host + domain for db server, or [local] (if over Unix socket), or [local:/dir/name] | |
%m - host name of the db server, truncated at the first dot, or [local] (if over Unix socket) | |
%> - port where db server is listening | |
%n - database session user name (changes based on SET SESSION AUTHORIZATION) | |
%/ - current database name |
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
CREATE SCHEMA pgbouncer AUTHORIZATION pgbouncer; | |
CREATE OR REPLACE FUNCTION pgbouncer.get_auth(p_usename TEXT) | |
RETURNS TABLE(username TEXT, password TEXT) AS | |
$$ | |
BEGIN | |
RAISE WARNING 'PgBouncer auth request: %', p_usename; | |
RETURN QUERY | |
SELECT u.rolname::TEXT |
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 | |
#coding=utf-8 | |
class Node: | |
def __init__(self, val, left, right): | |
self.val = val | |
self.left = left | |
self.right = right | |
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 mill._ | |
import mill.scalalib._ | |
import mill.modules.Jvm | |
import coursier.maven.MavenRepository | |
trait DefaultAppModule extends SbtModule { | |
def scalaVersion = "2.13.0" | |
val projectName : String = this.getClass.getName.split("\\$").last |
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
; -*- mode: clojure; -*- | |
; vim: filetype=clojure | |
; 日志 | |
(logging/init {:console true | |
:file "/var/log/riemann/riemann.log"}) | |
; 端口 | |
(let [host "127.0.0.1"] |