Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
import requests | |
import sys | |
import json | |
def waybackurls(host, with_subs): | |
if with_subs: | |
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host | |
else: | |
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host |
How to make an application icon for macOS using
iconset
&iconutil
#!/usr/bin/env python3 | |
# This script performs a GET and a POST request through HTTP/HTTPS using | |
# builtin python3 moudules. There is also a class to encode files for upload! | |
import urllib.request | |
import http.client | |
import mimetypes | |
import codecs | |
import uuid | |
import binascii |
// TextView subclass that replicates TVOS movies app | |
// Also made a quick presentation controller | |
// Just connect the delegate to the ViewController in IB | |
// and set the TextView class to FocusTextView | |
import UIKit | |
class TextPresentationViewController:UIViewController { | |
let label = UILabel() | |
let blurStyle = UIBlurEffectStyle.Dark |
Install pyenv using homebrew:
$ brew install pyenv
Install multiple versions of python:
$ pyenv install 3.2.6 3.3.6 3.4.3
chrome.webRequest.onHeadersReceived.addListener( | |
function (details) { | |
for (var i = 0; i < details.responseHeaders.length; ++i) { | |
if (details.responseHeaders[i].name.toLowerCase() == 'x-frame-options') { | |
details.responseHeaders.splice(i, 1); | |
return { | |
responseHeaders: details.responseHeaders | |
}; | |
} | |
} |
- (NSAttributedString *)loadContent { | |
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"input" ofType:@"html"]; | |
NSData *htmlData = [NSData dataWithContentsOfFile:filePath]; | |
NSDictionary *options = @{ | |
NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, | |
NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding) | |
}; | |
#!/bin/bash | |
mkdir -p ~/.ssh | |
# generate new personal ed25519 ssh keys | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs |
## Install necessary packages | |
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils | |
## get kvm unloaded so virtualbox can load | |
$ sudo modprobe -r kvm_amd kvm_intel | |
$ sudo service virtualbox stop | |
$ sudo service virtualbox start | |
## URL to most recent cloud image of 12.04 | |
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release" |