connect the usb stick.
sudo apt-get install testdisk e2fsprogs parted gdisk util-linux| trait ApiWithLoggingDirective extends HttpService { | |
| def clientIPOrLoopbackAddress: Directive1[RemoteAddress] = Directives.clientIP | provide(RemoteAddress("127.0.0.1")) | |
| def clientIPAndUri: Directive[RemoteAddress :: Uri :: HNil] = clientIPOrLoopbackAddress & requestUri | |
| def detachAndLogRequest: Directive0 = (detach(()) & clientIPAndUri).hflatMap { | |
| case (ip :: uri :: HNil) => RequestLog.requestLoggingDirective(ip, uri) | |
| } | |
| {% set local_source = '/usr/local/src' -%} | |
| {% set output_folder = '/tmp' -%} | |
| {% set nginx = pillar.get('nginx', {}) -%} | |
| {% set openresty_config = nginx.get('openresty', {}) -%} | |
| {% set openresty_version = openresty_config.get('version', '1.9.3.2') -%} | |
| {% set openresty_checksum = openresty_config.get('checksum', 'sha1=5a20c096250b8fc22b01c003ed5929bb4b07e960') -%} | |
| {% set openresty_package = 'ngx_openresty-' + openresty_version + '.tar.gz' -%} |
| npinge@content5-testing:~$ sudo dpkg -l | grep nginx | |
| npinge@content5-testing:~$ sudo dpkg -l | grep openresty | |
| npinge@content5-testing:~$ sudo dpkg -i ./openresty_1.9.3.2-1_amd64.deb | |
| Selecting previously unselected package openresty. | |
| (Reading database ... 89249 files and directories currently installed.) | |
| Preparing to unpack .../openresty_1.9.3.2-1_amd64.deb ... | |
| Unpacking openresty (1.9.3.2-1) ... | |
| dpkg: dependency problems prevent configuration of openresty: | |
| openresty depends on libgd2-xpm-dev; however: | |
| Package libgd2-xpm-dev is not installed. |
| # -*- coding: utf-8 -*- | |
| import json | |
| import pytest | |
| import validation | |
| CASES = [ |
| # -*- coding: utf-8 -*- | |
| import json | |
| import requests.models | |
| from deepdiff import DeepDiff | |
| def validate_status_code(response, status_code): | |
| """ |
| # -*- coding: utf-8 -*- | |
| import pytest | |
| from validation import * | |
| from fixtures import * | |
| CASES = [ | |
| { |
dumping request and response headers from tcpdump in a human readable way:
sudo stdbuf -oL -eL /usr/sbin/tcpdump -A -s 10240 "tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" | egrep -a --line-buffered ".+(GET |HTTP\/|POST )|^[A-Za-z0-9-]+: " | perl -nle 'BEGIN{$|=1} { s/.*?(GET |HTTP\/[0-9.]* |POST )/\n$1/g; print }'| # -*- coding: utf-8 -*- | |
| import unittest | |
| from app.lib.geo import generate_convex_hull | |
| class GenerateConvexHullTest(unittest.TestCase): | |
| def test_generate_convex_hull_with_degenerate_input(self): |