A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
| # IDEA Ignores # | |
| ################ | |
| *.iml | |
| *.ipr | |
| *.iws | |
| .idea/ | |
| out/ | |
| local.properties | |
| # Generic Android ignores # |
A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
| WITH date_series_bounds AS ( | |
| SELECT date('2012-12-21') as start, date('2013-08-23') as end | |
| ), date_series AS ( | |
| select date(days.start + days.interval) | |
| from ( | |
| select bounds.start, generate_series(0, bounds.end - bounds.start) AS interval from date_series_bounds bounds | |
| ) as days | |
| ) | |
| select * from date_series | |
| -- 2012-12-21 |
| /* | |
| This is an example Overpass query to view administrative boundaries. | |
| 1. Visit the OpenStreetMaps wiki (http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative) and see which levels are present for your country. If admin_level = N/A, that level is missing. | |
| 2. Go to http://overpass-turbo.eu and centre the map on the country of interest. | |
| 3. Delete the text on the left side of the overpass-turbo page and replace with the contents of this file | |
| 4. Edit the admin_level to the level you want to check - in the example above, the "admin_level" = "8". Press 'Run' to highlight and outline all boundaries for that level. |
Stream audio to any Sonos component via AirPlay using a Raspberry Pi (Model B, Raspbian Jessie) and the following software:
| #!/usr/bin/env ruby | |
| require 'open3' | |
| require 'fileutils' | |
| def run_command(command) | |
| puts("+: " + command) | |
| Open3.popen2e(command) do |stdin, stdout_stderr, wait_thread| | |
| Thread.new do | |
| stdout_stderr.each {|l| puts l } |
| #!/bin/bash | |
| if [ $# -ne 3 ]; then | |
| echo "usage: $0 <unix socket file> <host> <listen port>" | |
| exit | |
| fi | |
| SOCK=$1 | |
| HOST=$2 | |
| PORT=$3 |
http://tinkerman.cat/rpi3_iot_server.pdf (Catalan)
A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!
This guide was tested on: