Skip to content

Instantly share code, notes, and snippets.

Here's a prettty rough synopsis. Check this for a better intro with some simple background in cryptography: http://www.pgpi.org/doc/pgpintro/

The steps are not entirely easy (which is why I want to practice them).

  1. Get an implementation of PGP. GPG4Win works in windows, while a more secure approach is to make a dedicated Tails USB key and boot into the Tails OS whenever you want to use PGP.
  2. Generate a public key and a private key, and a public key fingerprint
  3. Send the public key to a friend
  4. Call that friend and read them the public key fingerprint
  5. That friend verifies the public key using the fingerprint and they own copy of PGP
@maxsu
maxsu / Circle Packing Script
Created July 17, 2015 06:57
A circle packing script in rhinoscript, for rhino 3d 4.0 only.
Option Explicit
'Script written by Steven Janssen
'Script copyrighted by Steven Janssen
'Script version Sunday, 18 May 2008 11:34:18 AM
Call Main()
Sub Main()
Dim arrPoint(), arrRadius(), intCircleNumber, arrInputR, arrSide(2)
Dim strCurrentCircleID, R, intCurrentCentre, k
Dim dblCosA, dblRotA
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: $0 [raspbian image]"
exit 1
elif [ ! -f $1 ]; then
echo "Error: File $1 not found." >&2
exit 1
fi
@maxsu
maxsu / f
Last active December 20, 2015 12:09
Find Script
#!/bin/bash
# usage: myfind [-d DIR] STRING [...]
# finds all files matching any given STRING in DIR, or the current working
# directory if DIR is not provided
arg=.
args=.
dir=.
@maxsu
maxsu / raspberry.log
Created July 31, 2013 20:54
Vagrant/Puppet output
--- Coffeebot/raspberry-devbox (master) vagrant up
[nox] Importing base box 'precise64'...
[nox] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.2.0
VirtualBox Version: 4.1.18
@maxsu
maxsu / Coffee.rb
Last active December 20, 2015 10:39
Rasberry Pi: I Require only the finest Bean
#####################################################################
#
# Author: Max Suica
#
# License: CC-BY-SA
#
# Description: This is some ruby code that will allow a Rasberry Pi
# to make coffee after receiving a command from Siri.
#
# Dependencies:

Working With Github Pages

The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.

Gitignore

Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.

Working With Code Partials

@maxsu
maxsu / ggg.pl
Created July 21, 2013 10:23 — forked from avar/ggg.pl
#!/usr/bin/env perl
use v5.10;
use warnings FATAL => "all";
use Dancer;
use URI::Escape qw(uri_escape_utf8);
# This is all the search engine does
get '/search' => sub {
given (param("q")) {
when (/^(?:!(?:ducky)?\s+|\\)(.*)/) { redirect 'http://www.google.com/search?btnI=1&q=' . uri_escape_utf8 $1 }
@maxsu
maxsu / changes
Created July 13, 2012 12:21
Changelog record finder
# Looks for pattern PATTERN in file input.tex.
# Returns an empty-line delimited block of text surrounding the pattern.
awk
-v "pattern=PATTERN"
-v "bold=$(tput bold)"
-v "sgr0=$(tput sgr0)"
-v RS=
-v 'ORS=\n\n'