Skip to content

Instantly share code, notes, and snippets.


Lucas Silva Simões lssimoes

View GitHub Profile
lssimoes /
Last active Feb 12, 2016 — forked from chrisroos/
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...
lssimoes /
Created Dec 29, 2015 — forked from gabrielsimoes/
Download homiliae from vatican and save as html
if [[ ! -n $1 ]]
curl $link > .tp1
lssimoes /
Created Dec 4, 2015 — forked from gizmaa/
Various Julia plotting examples using PyPlot
lssimoes / nonlinear-fit.jl
Last active Aug 29, 2015
View nonlinear-fit.jl
# Julia Version 0.4.0-dev+5181
# Commit 98c144b (2015-06-03 14:28 UTC)
# - PyPlot 1.5.3+ master
# - PyCall 0.8.1+ master
using Calculus, PyPlot, Roots
# function being approximated
# still needing to find a way to remove this redundancy..
lssimoes / nsquaregraph.jl
Last active Aug 29, 2015
Function that creates a N-sized square graph grid
View nsquaregraph.jl
using Graphs
# This implementation takes too long to create the graphs, so I'm almost sure it's not the best way (certainly is not the only way)
function nsquaregraph(n::Int)
# Creating Vertices Array
newvertices = Array(ExVertex, 0)
for i in 1:n^2
vertice = ExVertex(i,"eletron")
vertice.attributes["spin"] = randspin() # randspin() generates randomically -1 or +1
newvertices = [newvertices, vertice]
You can’t perform that action at this time.