Skip to content

Instantly share code, notes, and snippets.

View dersam's full-sized avatar

Samuel Schmidt dersam

View GitHub Profile
@dersam
dersam / gpg-import-and-export-instructions.md
Created September 20, 2016 19:14 — 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...

@dersam
dersam / index.php
Created February 1, 2016 15:19
[magento] multidomain-multistore-multistoreview setup with visible language codes

Use these snippets to setup a magento installation with the following structure:

DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (
`id` int(11) NOT NULL auto_increment,
`country_code` varchar(2) NOT NULL default '',
`country_name` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
);
INSERT INTO `countries` VALUES (1, 'US', 'United States');
INSERT INTO `countries` VALUES (2, 'CA', 'Canada');