I just announced the release of FlyingCloud 0.3.0
on the flyingcloud-users mailing list.
I’ll have more to say about FlyingCloud in future.
For now, let’s just say it’s a tool that we use to build
Docker images using masterless SaltStack.
I’ll be speaking about FlyingCloud at Wednesday’s PuPPy meetup.
From Python, I needed to find a process
that was performing SSH tunneling on port 8080
and kill it.
The following works in Bash:
ps aux | grep [s]sh.*:8080 | awk '{print $2}' | xargs kill -9
The grep [s]sh trick ensures that the grep command itself
won’t make it through to awk.
Here’s what I came up with in Python using psutil:
def kill_port_forwarding(host_port):
ssh_args = ["-f", "-N", "-L", "{0}:localhost:{0}".format(host_port)]
for process in psutil.process_iter():
try:
if process.name().endswith('ssh'):
…continue.
Deadpool is the role that Ryan Reynolds was born to play,
the "Merc with a Mouth" anti-hero
who breaks the fourth wall and breaks heads with equal facility.
It’s very funny, very twisted, and very violent,
and it fully deserves its R rating.
Wade Wilson, a former mercenary, has terminal cancer.
He undergoes a treatment that
not only cures his cancer and renders him capable of regenerating quickly from any wound,
but leaves him horribly scarred.
The treatment was actually intended to turn him into a super slave.
Wanting both revenge and a cure for his disfigurement,
he suits up and tracks down his former captors,
leaving dozens of dead henchmen in his wake.
As …continue.
Title: Crack’d Pot Trail
Author: Steven Erikson
Rating: ★ ★ ★ ½
Publisher: Tor
Copyright: 2009
Pages: 208
Keywords: fantasy
Reading period: 16–28 February, 2016
A disparate group of necromancer hunters and artists are trekking through the desert.
They’re out of food and the artists must compete not to be eaten by the strongmen
by telling stories by the campfire.
It’s the Canterbury Tales crossed with Scheherazade.
The narrator shows how he skillfully and shamelessly manipulated the various parties.
His stories within stories sow doubt and dissension.
There’s black humor and art criticism and enough suspense to keep you going,
once you get past the interminable beginning.
Title: Ways to Die in Glasgow
Author: Jay Stringer
Rating: ★ ★ ★ ½
Publisher: Thomas & Mercer
Copyright: 2015
Pages: 289
Keywords: crime, tartan noir, black comedy
Reading period: 7 December 2015—25 February 2016
New private investigator Sam Ireland
is hired to track down a gangster-turned-memoirist.
She can’t find him, but she’s not the only one looking.
His lethal nephew also wants to find him, after dealing with two hit men.
All of this searching is drawing unwelcome attention to long-held secrets,
and more blood will be shed.
A darkly amusing, frenetic tour through Glasgow’s underbelly.
I needed to import some plugin code written in Python
from a directory whose path isn’t known until runtime.
Further, I needed a class object that was a subclass of the plugin base class.
from somewhere import PluginBase
class SomePlugin(PluginBase):
def f1(self): ...
def f2(self): ...
You can use the imp module to actually load the module from impl_dir.
Note that impl_dir needs to be temporarily prepended to sys.path.
Then you can find the plugin subclass using dir and issubclass.
import os, imp
def import_class(implementation_filename, base_class):
impl_dir, impl_filename = os.path.split(implementation_filename)
module_name, _ = os.path.splitext(impl_filename)
try:
…continue.
It’s better to stay calm when things aren’t going well.
Stress and panic are contagious.
When you’re broadcasting stress or panic on all channels,
other people start picking it up.
If you can keep your cool, others are more likely to remain calm too.
Often that’s for the best,
but sometimes it backfires
because others incorrectly believe that everything is still okay.
Knowing when to ask for help is an art.
You learn a lot when you persevere and try different things,
many of which may fail.
The failures will likely show you where your understanding is deficient;
you learn some of the many ways in which things can go wrong.
If you throw …continue.
I mentioned a few weeks ago that I was going to be the Contest Chair
for the International Speech and Evaluation Contests
at Freely Speaking Toastmasters.
Those contests were tonight,
and I was both Contest Chair and Toastmaster.
The contest chair sets up everything beforehand;
the toastmaster runs the contest itself;
frequently but not necessarily the contest chair is also the toastmaster.
I’m happy with how it came off.
I managed to recruit two speakers for the Speech contest
and three evaluators for the Evaluation contest,
all of whom acquitted themselves well.
I also recruited three judges, two ballot counters, one timer,
a sergeant at arms, and a test speaker
to make the contest run.
The …continue.
I came across this cartoon today;
it reminded me that I’ve been meaning to write
about the hit-or-miss nature of adapting books for the screen.
Books and video/film are different media,
with different conventions and needs.
Often the most-loved elements of a book are lost
when it’s adapted for television or film,
upsetting fans.
As J.K. Rowling wrote about one of the Harry Potter movies:
"It is simply impossible to incorporate every one of my storylines
into a film that has to be kept under four hours long.
Obviously films have restrictions
– novels do not have constraints of time and budget;
I can create dazzling effects relying on nothing but
the interaction of my own and …continue.
I was sent an invite to Keybase a few weeks, which I accepted tonight.
Keybase Wants To Make Serious Encryption Accessible To Mere Mortals explains:
From a cryptographic standpoint, PGP is rock solid.
In practice, using it is very messy.
Its complexity has deterred the vast majority of people
who might otherwise benefit from using encryption.
The first problem is establishing a valid identity,
especially with other people located oceans away.
The second is distributing public keys
without nefarious types posting alternative keys
that appear to be registered to the same person.
…
The third issue is getting people to install and use PGP software.
I can now be reached via https://keybase.io/georgevreilly.
I’ve proved my identity on
GeorgeVReilly.com, GitHub, …continue.
Previous »
« Next