Skip to content

Instantly share code, notes, and snippets.

@jottr
jottr / vj.sh
Last active July 14, 2017 23:01 — forked from kljensen/vj.sh
A simple, encrypted journal using vim.
#!/usr/bin/env bash
##########################################################
#
# This is a shell script for keeping a journal that is
# * plaintext,
# * time-stamped,
# * encrypted, and
# * edited with vim.
#
@jottr
jottr / pdfcrop
Created December 4, 2015 16:55
A better pdfcrop, which preserves links
#!/bin/bash
# from http://tex.stackexchange.com/questions/42236/pdfcrop-generates-larger-file
function usage () {
echo "Usage: `basename $0` [Options] <input.pdf> [<output.pdf>]"
echo
echo " * Removes white margins from each page in the file. (Default operation)"
echo " * Trims page edges by given amounts. (Alternative operation)"
echo
echo "If only <input.pdf> is given, it is overwritten with the cropped output."
@jottr
jottr / gist:679617aba5a7b09d1039
Created December 13, 2015 19:13 — forked from dbiesecke/movies.m3u
pvr.iptvsimple iptvde.m3u
#EXTM3U
#EXTINF:-1 tvg-id="ARD.de" tvg-logo="ard.png",ARD
http://daserste_live-lh.akamaihd.net/i/daserste_de@91204/master.m3u8
#EXTINF:-1 tvg-id="ZDF.de" tvg-logo="zdf.png",ZDF
http://zdf_hds_de-f.akamaihd.net/i/de14_v1@147090/master.m3u8
#EXTINF:-1 tvg-id="tagesschau24.de" tvg-logo="tagesschau24.png",TAGESSCHAU 24
http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/master.m3u8
#EXTINF:-1 tvg-id="ZDFneo.de" tvg-logo="zdfneo.png",ZDF NEO
http://zdf_hds_de-f.akamaihd.net/i/de13_v1@147090/master.m3u8
#EXTINF:-1 tvg-id="ZDFinfo.de" tvg-logo="zdfinfo.png",ZDF INFO
@jottr
jottr / -
Created December 18, 2015 18:10
2015-12-18 18:51:40 -- irc: connecting to server chat.freenode.net/7000 (SSL)...
2015-12-18 18:51:40 -- gnutls: connected using 1024-bit Diffie-Hellman shared secret exchange
2015-12-18 18:51:40 -- gnutls: receiving 3 certificates
2015-12-18 18:51:40 -- - certificate[1] info:
2015-12-18 18:51:40 -- - subject `OU=Domain Control Validated,OU=Gandi Standard Wildcard SSL,CN=*.freenode.net', issuer `C=FR,ST=Paris,L=Paris,O=Gandi,CN=Gandi Standard SSL CA 2', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-12-14 00:00:00 UTC', expires `2017-02-16 23:59:59 UTC', SHA-1 fingerprint `b0c1578208ed07682b9439a0b010f32b290c1956'
2015-12-18 18:51:40 -- - certificate[2] info:
2015-12-18 18:51:40 -- - subject `C=FR,ST=Paris,L=Paris,O=Gandi,CN=Gandi Standard SSL CA 2', issuer `C=US,ST=New Jersey,L=Jersey City,O=The USERTRUST Network,CN=USERTrust RSA Certification Authority', RSA key 2048 bits, signed using RSA-SHA384, activated `2014-09-12 00:00:00 UTC', expires `2024-09-11 23:59:59 UTC', SHA-1 fingerprint `
@jottr
jottr / telnet.txt
Created April 28, 2016 05:40
Telnet test
$ telnet smtp.sparkpostmail.com 587
Trying 52.10.55.4...
Connected to smtp.sparkpostmail.com.
Escape character is '^]'.
220 2.0.0 smtp.sparkpostmail.com ESMTP ecelerity 4.2.18.54483 r(Core:4.2.18.0) Thu, 28 Apr 2016 05:37:55 +0000
EHLO smtp.sparkpostmail.com
250-momentum1.platform1.us-west-2.aws.cl.messagesystems.com says EHLO to 148.251.138.38:51871
250-STARTTLS
250-8BITMIME
250-PIPELINING
df['account.fullname'][11:20]
'''
guid
13592a1b945f1ee334c5982049b35327 Aktiva:Barvermögen:Girokonto
9d362dd65015be27e5d9d9647c4d4f29 Aktiva:Barvermögen:Girokonto
5f0744ca60a81c338ae6ef24c1cb9156 Aufwendungen:Haushalt:Lebensmittel
45686c3148f09629606d57711417c788 Aufwendungen:Kleidung
6a4cf43b57252b85611b0e2356531d10 Aktiva:Barvermögen:Girokonto
# A pandas dataframe with the following keys
df.keys()#=>
'''
Index([u'value', u'quantity', u'transaction.post_date',
u'transaction.currency.guid', u'transaction.currency.mnemonic',
u'account.fullname', u'account.commodity.guid',
u'account.commodity.mnemonic'],
dtype='object')
'''

Keybase proof

I hereby claim:

  • I am jottr on github.
  • I am jottr (https://keybase.io/jottr) on keybase.
  • I have a public key ASDBTvAOBDN2gW1carORAspvaKR5wsYH5okb29fLu0rnTQo

To claim this, I am signing this object:

@jottr
jottr / install-comodo-ssl-cert-for-nginx.rst
Created December 8, 2017 10:29 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert