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
// Run PostgreSQL server: | |
// docker run -e POSTGRES_PASSWORD="" -p 5432:5432 postgres | |
// Monitor running processes: | |
// watch -n 1 'echo "select pid,query_start,state,query from pg_stat_activity;" | psql -h localhost -U postgres | |
// | |
// For all handlers, call to db takes 5 seconds, | |
// | |
// Three endpoints: | |
// - "/" - take 5 seconds | |
// - "/ctx" - take 1 seconds, due to 1 second cancellation policy |
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
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround | |
Install `redhat-rpm-config` | |
$ sudo dnf install redhat-rpm-config |
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
# Notify Slack - Send notifications to a Slack Channel | |
# Copyright (C) 2016 Gustavo Arjones (@arjones) | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# Full blog post here: http://arjon.es/2016/09/15/be-notified-on-slack-when-a-long-process-finishes/ | |
# |
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 | |
""" | |
no more embarrasing "removed pdb, sorry" commits | |
install | |
------- | |
save it as .git/hooks/pre-commit giving +x permission | |
""" |
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
[general] | |
accounts = GMail | |
maxsyncaccounts = 3 | |
[Account GMail] | |
localrepository = Local | |
remoterepository = Remote | |
autorefresh = 5 | |
quick = 5 |
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/xmlsec1-config.orig 2015-02-25 13:47:13.384286257 +0100 | |
+++ /usr/bin/xmlsec1-config 2015-02-25 13:46:54.849285579 +0100 | |
@@ -199,7 +199,7 @@ | |
# | |
# Assemble all the settings together | |
# | |
-the_flags="$the_flags -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1 -I/usr/include/xmlsec1 $the_xml_flags $the_xslt_flags $the_crypto_flags" | |
+the_flags="$the_flags -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1 -DXMLSEC_NO_SIZE_T -I/usr/include/xmlsec1 $the_xml_flags $the_xslt_flags $the_crypto_flags" | |
the_libs="$the_libs -L${package_libdir} -lxmlsec1 -lltdl $the_xmlsec_crypto_lib -lxmlsec1 $the_xml_libs $the_xslt_libs $the_crypto_libs" |
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
with mock.patch("%s.restart_server" % module_under_test, autospec=True) as mock_restart: | |
restart_servers_in_datacenter(servers, "sfo") | |
mock_restart.assert_called_once() |
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
# vim: set ft=python : | |
from __future__ import print_function | |
import json | |
import sys | |
import datetime | |
from redis import StrictRedis as Redis |
NewerOlder