Another Amazing Waterfall
Reading: Cibola Burn, Excession Location: 57.168, -2.1055
Reading: Cibola Burn, Excession Location: 57.168, -2.1055
This plane sit in a glacial outwash plain in the South of Iceland. The area around it is barren and devoid of life. We arrived in a fog bank, there was nothing to see in any direction save from the well worn path out to the wreckage.
Walking out was like being in a dream, we could see through the haze the bright clothing of other visitors to the plane.
The fog lifted for our return journey, the landscape didn't improve. The area is almost completely flat, with small undulating banks of aggregate. The entire place looked life the surface of mars renderer in black.
Reading: Cibola Burn, Excession Location: 57.168, -2.1055
I use taskwarrior to manage tasks, well sort of. Every so often I fill it with highish level tasks and leave it completely forgotten for a few weeks. On a similar frequency(though out of phase) I look through my task list and prune out the things I have done. This isn't great, I have had a lot of trouble refining down tasks, figuring out what to do, then doing it.
Last night I thought I would try to start generating a set of tasks to do TOMORROW , then when I got to work the next today I could ask task warrior what it I was to do that day. Taskwarrior makes that sort of easy with virtual tags, the virtual tags can only be generated by due dates.
$ task add due:tomorrow proj:life get milk
Created task 1
Will generate a task, due tomorrow today, but come tomorrow it will be tagged
with today. Makes sense right?. We can then easily search for all tasks
matching the
TODAY
tag:
$ task +TODAY list
ID Age P Project Due Description Urg
1 1m L life 2016-11-30 get milk 1
1 task
The taskwarriors output looks awesome on the command line, but it doesn't come
out my thermal printer very well. Taskwarrior will output json with the
export
flag, json isn't very fun on the command line. Thankfully there is the
jq
tool.
jq
claims to be like sed for json, explains it's near
inscrutability.
With these bits we can generate a snappy list of things we have to do today:
figlet -f small TODAY:;cat tmp.json| jq -r '''.[] | .project,.description,""'''
Something like:
_____ ___ ___ ___ ___
|_ _/ _ \| \ /_\ \ / (_)
| || (_) | |) / _ \ V / _
|_| \___/|___/_/ \_\_| (_)
schemes.crime.bank
Order drawings of bank
schemes.crime.bank
Enroll on plasma cutting course
schemes.crime.botnet
Establish control channel for bots on freenode
schemes.crime.botnet
Register spam address
life
get milk
life
put bins out
Which is really easy to spit out to my thermal printer:
I wonder if there is some way to get xscreensaver to run a script when I log in? I could use that hook to tidy away undone tasks and do the print out on my first log in of the day.
Reading: Cibola Burn, Excession
python-libtrace comes highly recommended over scapy . Scapy always feels a bit alien to me, I think the custom repl front end aimed at 'security people' (whatever that means). I am sure it is there to make things simple, but for me it just makes it harder to write programs with.
python-libtrace
certainly isn't easy to install, all of the documentation is
left to the libtrace project. Once I figured out the magic words I was able to
throw together a dscp mark classifier really quickly. For live capture on your
system you will probably have to change the
bpf:em0
to something like
pcapint:eth0
.
import plt
import time
trace = plt.trace('bpf:em0')
trace.start()
INTERVAL = 1
dscp = {}
start = time.time()
try:
for pkt in trace:
ip = pkt.ip
if not ip:
continue
dscpvalue = ip.traffic_class >> 2
if dscpvalue in dscp:
dscp[dscpvalue] = dscp[dscpvalue] + 1
else:
dscp[dscpvalue] = 1
done = time.time()
if done - start > INTERVAL:
print("marks:".format(len(dscp)), end="")
for mark,count in dscp.items():
print(" {}:{},".format(mark, count), end="")
print("")
dscp = {}
start = done
except KeyboardInterrupt:
trace.close()
sys.exit()
This can be tested with netcat quite easily, though the options seem to be different everywhere.
nc -u -T ef [host] [post]
Reading: Cibola Burn, Excession
I wrote up a script yesterday to grab the most recent file from the super awesome toshiba flashair wifi sd card . I had suggested the card to someone in the hackerspace, he planned on using it to help align a camera trap (not that model, but you get the idea).
Once you put the trap up a tree, it is a real hassle to figure out if it is really pointing the way you want it to. So use the wifi sd card to grab the latest image and confirm it is.
After writing the script I tried for a while to get my laptop connected, but it seems that the camera trap doesn't keep the card powered on for nearly long enough. I might be able to get it to work if I can get my laptop to over overzealous in connecting to the wifi.
It is Sunday, so that makes seven days of writing .
Reading: Cibola Burn, Excession Location: 57.155,-2.210
Apparently there isn't a simple API to turn a lat/lon into the weather. I have no idea why web services all seem to insist on having an API key for all requests. It is just annoying.