This is my i3
config, using FontAwesome icons for i3status
.
Save files to ~/.i3
.
# Dropbox import script | |
require 'find' | |
require 'socket' | |
# This _so_ needs more functions and any sort of error handling whatsoever. | |
class MyriadInterface | |
def initialize | |
@socket = TCPSocket.new( 'localhost', 6950 ) | |
end | |
def import(path,start,finish) | |
puts "Importing file '#{path}' to cart range between #{start} and #{finish}" |
This is my i3
config, using FontAwesome icons for i3status
.
Save files to ~/.i3
.
#!/usr/bin/env python | |
import socket | |
import sys | |
if len(sys.argv) != 3: | |
print "Usage: %s host:port destfile.jpg" % sys.argv[0] | |
sys.exit(1) | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
host, port = sys.argv[1].split(':') |
The SamKnows Whitebox is a free router (TP-Link TL-WDR3600) provided by SamKnows to gather internet speed statistics. Ok that's great, but any person with a small amount of hacker's spirit will want to hack it to install some custom firmware to take advantage of the two gigantic antennas on the back, the USB ports and everything else.
Root access can be obtained via a "debug mode" on the router giving you a direct root shell via telnet, amazingly simple.
192.168.1.2
, the Subnet Mask to 255.255.255.0
and the Gateway to 192.168.1.1
.This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging
loggers, and they both will be processed by the Structlog pipeline (see the hello()
endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id
middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom