IN 1552060842.6432996 [{"id":1,"channel":"/meta/handshake","supportedConnectionTypes":["websocket"],"version":"1.0","ext":{"ack":true,"timesync":{"tc":1552060842643}}}]
OUT 1552060842.6573672 [{"minimumVersion":"1.0","clientId":"21goxg4y4lnjv5pd5ws3lvpj2o","supportedConnectionTypes":["websocket","long-polling","callback-polling"],"advice":{"interval":0,"timeout":30000,"reconnect":"retry"},"channel":"/meta/handshake","id":"1","version":"1.0","successful":true}]
IN 1552060843.1454756 [{"id":2,"channel":"/meta/connect","connectionType":"websocket","ext":{"ack":1,"timesync":{"tc":1552060843145}},"clientId":"21goxg4y4lnjv5pd5ws3lvpj2o"}]
OUT 1552060843.1552584 [{"channel":"/meta/connect","id":"2","successful":true}]
This file contains hidden or 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 perl | |
| =head1 NAME | |
| quick-stats.pl - Calculate the basic statistical attributes of a list of numbers | |
| =head1 SYNOPSIS | |
| echo <list of numbers> | ./quick-stats.pl |
This file contains hidden or 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 perl | |
| =head1 NAME | |
| map-size.pl - Shows process memory segment sizes | |
| =head1 SYNOPSIS | |
| cat /proc/[pid]/maps | ./map-size.pl |
This file contains hidden or 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
| #!/bin/bash | |
| INFILE="$1" | |
| OUTFILE="$2" | |
| which ffmpeg > /dev/null || { | |
| echo "You need ffmpeg to convert audio files to Alexa MP3 format" | |
| exit 1 | |
| } |
This file contains hidden or 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
| [main] INFO org.eclipse.jetty.util.log - Logging initialized @107ms to org.eclipse.jetty.util.log.Slf4jLog | |
| [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.z-SNAPSHOT; built: 2019-02-15T16:53:49.381Z; git: eb70b240169fcf1abbd86af36482d1c49826fa0b; jvm 10.0.2+13-Ubuntu-1ubuntu0.18.04.4 | |
| [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@53976f5c{/,null,AVAILABLE} | |
| [main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@25f8524{HTTP/1.1,[http/1.1]}{0.0.0.0:8008} | |
| [main] INFO org.eclipse.jetty.server.Server - Started @309ms | |
| Server@2ef3eef9{STARTED}[9.4.z-SNAPSHOT] - STARTED | |
| += QueuedThreadPool[qtp1413653265]@5442a311{STARTED,10<=10<=100,i=5,q=0}[ReservedThreadExecutor@47987356{s=0/8,p=0}] - STARTED | |
| | += ReservedThreadExecutor@47987356{s=0/8,p=0} - STARTED | |
| | +> threads size=10 | |
| | +> 21 qtp1413653265-21 IDLE TIMED_WAITING @ java.base@10.0.2/jdk.internal.misc.Unsafe.park(Native Method) |
This file contains hidden or 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/python3.7 | |
| import aiohttp | |
| from aiohttp import web, WSCloseCode | |
| import asyncio | |
| async def http_handler(request): | |
| return web.Response(text='Hello, world') |
This file contains hidden or 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
| vcl 4.0; | |
| import std; | |
| import vsthrottle; | |
| sub vcl_recv { | |
| ... | |
| call rate_limit; | |
| ... | |
| } |
This file contains hidden or 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
| # | |
| # Varnish appends ${localhost} (= 127.0.0.1) to the XFF header | |
| # automatically and transparently *before* calling vcl_recv(). | |
| # | |
| # Not a problem for the Rest backend, but in the interest of | |
| # trying to be as transparent as possible, we have the option | |
| # to clean it out. | |
| # | |
| sub clean_x_forwarded_for { | |
| if (req.http.X-Forwarded-For != "") { |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Fix broken mysql meta tables. | |
| # | |
| # For some reason, `innodb_*_stats' tables seem to be corrupted (not existing | |
| # when being queried from mysql shell, but physical files do exist). | |
| # `slave_worker', `slave_relay_log_info' and `slave_master_info' tables | |
| # seem to have the same problem, which `mysql_install_db' will happily fix. | |
| # | |
| # This script performs the necessary steps to have that done. |
This file contains hidden or 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
| $ cat /etc/apt/preferences.d/puppet | |
| Explanation: Need passenger to run Puppetmaster | |
| Package: puppetmaster-common puppetmaster puppet puppet-common facter puppetmaster-passenger | |
| Pin: release o=Debian | |
| Pin-Priority: 999 |