- Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot- Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';| // For all the confusing Prometheus configuration and | |
| // regular expressions, | |
| // explained in examples. | |
| // Remember, there are default values for each item if it's missing. | |
| // regex is (.*), | |
| // replacement is $1, | |
| // separator is ; | |
| // ,and action is replace |
tmux new - Create and attach to a new session.tmux new -s NAME_HERE - Create and attach to a new session named NAME_HERE.CTRL-b, d - Detach (i.e. exit) from the currently-opened tmux session (alternatively, tmux detach). Note, this means press and hold CTRL, press b, release both, press d.tmux ls - Show list of tmux sessions.tmux a - Attach to the previously-opened tmux session.tmux a -t NAME_HERE - Attach to the tmux session named NAME_HERE.CTRL-d - Delete (i.e. kill) currently-opened tmux session (alternatively tmux kill-session).CTRL-b, [ - Enter copy mode, and enable scrolling in currently-opened tmux session. Press q to exit.CTRL-b, " - Split window horizontally (i.e. split and add a pane below).| #!/usr/bin/perl | |
| use Digest::HMAC_MD5 qw/ hmac_md5_hex /; | |
| use DBI; | |
| use URI::Escape; | |
| use CGI; | |
| print "Content-type: text/html\n"; | |
| my $q = CGI->new; |
body_filter_by_lua documentation: https://github.com/openresty/lua-nginx-module#body_filter_by_luahttp {
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G;
server {
listen 8080;
location /replace-body {
| # Create an access token for user "admin" with name "test-1234" | |
| # POST /users/{username}/tokens/{name} | |
| $ curl -i -u admin:admin -H 'Accept: application/json' -X POST 'http://127.0.0.1:12900/users/admin/tokens/test-1234?pretty=true' | |
| HTTP/1.1 200 OK | |
| X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd | |
| Content-Type: application/json | |
| Date: Mon, 08 Aug 2016 12:12:09 GMT | |
| Content-Length: 139 | |
| { |