version: '2'
services:
dns-gen:
container_name: dns-gen
image: jderusse/dns-gen
ports:
| -- 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%' |
| <?php | |
| interface Worker | |
| { | |
| public function getCommand(); | |
| public function done($stdout, $stderr); | |
| public function fail($stdout, $stderr, $status); | |
| } |
| fix for hotkeys not functional in non-latin keyboard layout in 13.10 / 14.04 | |
| tested on ubuntu 14.04, jvm7 and rubymine 6.3 | |
| sudo add-apt-repository ppa:attente/java-non-latin-shortcuts | |
| sudo apt-get update | |
| sudo apt-get dist-upgrade | |
| restart unity-settings-daemon | |
| now ctrl+c, ctrl-v etc should work in most java applications like IDEA, RubyMine IDE even on russian keyboard layout |
| zend_extension=xdebug.so | |
| xdebug.default_enable = 1 | |
| xdebug.cli_color = 1 | |
| xdebug.overload_var_dump = 1 | |
| xdebug.var_display_max_children = -1 | |
| xdebug.var_display_max_data = 4096 | |
| xdebug.var_display_max_depth = 10 | |
| xdebug.max_nesting_level = 250 | |
| xdebug.remote_enable = 1 |
| apt-get install wkhtmltopdf | |
| apt-get install xvfb | |
| echo 'xvfb-run --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh | |
| chmod a+rx /usr/bin/wkhtmltopdf.sh | |
| ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf | |
| wkhtmltopdf http://www.google.com output.pdf |
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
| --- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
| --- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
| -- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
| ------------ | |
| -- Basics -- | |
| ------------ | |
| -- Get indexes of tables |
java -jar /home/expert/work/tools/apktool.jar d [email protected]android:networkSecurityConfig="@xml/network_security_config" attribute to application element.<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
SSH (Secure Shell) to a host existing in an internal network through a reverse-tunneled SSH connection to an externally accessible VPS (Virtual Private Server). This setup is described where the internal host is a Raspberry Pi, but can be generalized for any host on the internal network that runs an OpenSSH server.
internal network Internet home network
|| ||
------------------ || ------------------ || ------------------
| | reverse SSH tunnel (VPS $tunnel_port to Pi port 22) | | || | |
| Raspberry Pi ==================================================> VPS ===================