The way this works is that for each notebook, jupyter starts a python "kernel" process that actually runs the notebook's code. That kernel gets a json file with info on the notebook's location on the disk passed through its command line. Since we're running code in that exact python process, we can just grab that json file from sys.argv, and read it ourselves.
Since password managers are big and complicated and I currently am pretty bored since I am sitting in a car for a few hours, here is a simple algorithm to generate resource-specific, unique passwords using a master password and no password database.
As pointed out here: http://news.ycombinator.com/item?id=4374888 this method is broken.
| #!/usr/bin/env python3 | |
| import ctypes | |
| import gi | |
| gi.require_version('Gtk', '3.0') | |
| from gi.repository import Gtk, GLib | |
| gi.require_version('GL', '1.0') | |
| from OpenGL import GL, GLX |
When xscreensaver starts screen saving, instead of a boring screen saver it spawns a small shell script. This shell script starts a new X server with a very minimal awesome window manager and unfreezes a kvm virtual machine containing a Windows XP on that X server, ready to be used by any passersby. To unlock the screen, you need to switch back to the VT where your usual X is running. As soon as the screen is unlocked, xscreensaver sends a SIGTERM to the shell script which in turn stops all the X servers, window managers and virtual machines it launched and resets the VM image. Should the VM exit before the screen is unlocked because somebody pressed "Shut down" the VM image is reset and the VM restarted.
| #!/bin/bash | |
| user="crlf" | |
| function irccmd { | |
| echo -e "$1\r" >&3 | |
| } | |
| function send_message { | |
| if [ -n "$2" ]; then |
| #!/usr/bin/env python3 | |
| import numpy as np | |
| from math import sin, cos, pi, sqrt | |
| import svgwrite | |
| import itertools | |
| def cam(f): | |
| """ Returns a camera matrix for the given focal length """ | |
| return np.array(((1,0,0,0), | |
| (0,1,0,0), |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import re | |
| pinyinToneMarks = { | |
| u'a': u'āáǎà', u'e': u'ēéěè', u'i': u'īíǐì', | |
| u'o': u'ōóǒò', u'u': u'ūúǔù', u'ü': u'ǖǘǚǜ', | |
| u'A': u'ĀÁǍÀ', u'E': u'ĒÉĚÈ', u'I': u'ĪÍǏÌ', | |
| u'O': u'ŌÓǑÒ', u'U': u'ŪÚǓÙ', u'Ü': u'ǕǗǙǛ' | |
| } |
| #!/usr/bin/env python3 | |
| # coding: utf-8 | |
| import csv | |
| import argparse | |
| avm_xml_template = '''<?xml version="1.0" encoding="utf-8"?> | |
| <phonebooks> | |
| <phonebook> | |
| {entries} |
mullvad-up.shas called fromopenvpn.confwould be unnecessary if openvpn would fork after setting up thetuninterface, for then its contents could be realized with a few systemdExecStartPost-directives.- Some means of automatically detecting and stopping/reconnecting a broken connection would be nice.
- Due to libcurl being buggy, transmission-daemon leaks DNS requests. I don't mind, if you do, consider using a couple of iptables rules to route any packets coming from transmission's UID through a special routing table.