-
Install
socat
anddtach
on all hosts, andopenssl
on at least one host. Andvim
on the server! -
Generate two self-signed keypairs. You can accept all default values.
for h in server client; do openssl req -newkey rsa:2048 -nodes -keyout $h-key.pem -x509 -days 365 -out $h-cert.pem done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import factory | |
class Comment: | |
"""A comment model can have replies, which are also Comments.""" | |
def __init__(self, author, text, replies=[]): | |
self.author = author | |
self.text = text | |
self.replies = replies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BACKUP_PARENT=$HOME/.config/vivaldi/viv_session | |
BACKUP_LAST=$(find "$BACKUP_PARENT" -type d | sort -h | tail -n 1) | |
VIVDIR=$HOME/.config/vivaldi/Default | |
diff "$BACKUP_LAST/Current Session" "$VIVDIR/Current Session" > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
#echo "no change" | |
exit 0; | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please don't even look at this horrible, write-only code | |
require 'parslet' | |
require 'pry' | |
class XComposeParser < Parslet::Parser | |
rule(:line) do | |
input.as(:input) >> spaces >> | |
match(':') >> spaces >> | |
output.as(:output) >> match['\n'].maybe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am elebow on github. | |
* I am eddielebow (https://keybase.io/eddielebow) on keybase. | |
* I have a public key whose fingerprint is 3C49 6E8B F9C9 2612 BA78 2714 F1D8 CC3A D29D 3693 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"text": " <a href=http://saturn.jpl.nasa.gov>Cassini</a>, <a href=http://saturn.jpl.nasa.gov/news/significantevents/significantevents20140724/>Titan Flyby</a>, Successful", "date1": "2014 7 20", "date2": null}, {"text": " <a href=http://www.nasa.gov/press/2014/july/nasa-honors-historic-first-moon-landing-eyes-first-mars-mission/>45th Anniversary (1969)</a>, <a href=http://en.wikipedia.org/wiki/Apollo_11>1st Man On The Moon (Apollo 11)</a>", "date1": "2014 7 20", "date2": null}, {"text": " <a href=http://ssd.jpl.nasa.gov/sbdb.cgi?orb=1;sstr=106P>Comet 106P/Schuster</a> <a href=http://scully.cfa.harvard.edu/cgi-bin/returnprepeph.cgi?d=c&o=0106P>Perihelion</a> (1.546 AU)", "date1": "2014 7 20", "date2": null}, {"text": " <a href=http://ssd.jpl.nasa.gov/sbdb.cgi?orb=1;sstr=283P>Comet 283P/Spacewatch</a> <a href=http://scully.cfa.harvard.edu/cgi-bin/returnprepeph.cgi?d=c&o=0283P>At Opposition</a> (2.880 AU)", "date1": "2014 7 20", "date2": null}, {"text": " <a href=http://ssd.jpl.nasa.gov/sbdb.cgi?ID=c00128_b>Co |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import urllib.request | |
import re | |
import json | |
#The source is HTML 3.2. Every modern parser I tried choked on it. So, we'll use regexes to extract what we want. The | |
#source HTML appears to be generated by a simple algorithm and has a very regular structure. I am aware of the | |
#implications of using regexes on HTML, but I think it's safe given the known constraints on our input. |