Skip to content

Instantly share code, notes, and snippets.

View danschultz's full-sized avatar
🇺🇦

Dan Schultz danschultz

🇺🇦
View GitHub Profile
@danschultz
danschultz / gpg-import-and-export-instructions.md
Created March 15, 2016 03:17 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@danschultz
danschultz / rspec.dart
Last active December 20, 2015 19:29 — forked from vsavkin/rspec.dart
library test_framework;
import 'package:unittest/unittest.dart';
// RSpec like framework
typedef Closure();
class Example {
String name;
Closure body;
@danschultz
danschultz / install_homebrew.rb
Created August 12, 2011 19:12 — forked from mxcl/install_homebrew.markdown
Installs Mixbook's forked Homebrew to /usr/local
#!/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end