View gpg-import-and-export-instructions.md

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...
View ElixirLearningLinks.md
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
View gist:8a50aecec3ffe9977696
(setq x 10)
(defun f (y)
(+ x y))
(defun g ()
(let ((x 100))
(f 1)))
(f 2) ; Evaluates to 12
View gist:ce6a5b1d6b077ab2945a
- val x = ref 2;
val x = ref 2 : int ref
- fun f y = !x + 10;
val f = fn : 'a -> int
- f 10;
val it = 12 : int
- x := 10;
View gist:28074be159719ba4c15c
>>> x = 2
>>> def f (y): return x + y
...
>>> f(10)
12
>>> def g ():
... x = 10
... return f(10)
...
>>> g()
View gist:3180d42af0616f4fc0d0
- Int.toString;
[autoloading]
unexpected exception (bug?) in SML/NJ: Io [Io: openIn failed on "/home/rohit/sml.boot.x86-unix/smlnj/basis/.cm/x86-unix/basis.cm", No such file or directory]
raised at: Basis/Implementation/IO/bin-io-fn.sml:617.25-617.71
../cm/util/safeio.sml:30.11
../compiler/TopLevel/interact/evalloop.sml:44.55
View gist:4148067
## Current
```
९ bundle help gem
Usage:
bundle gem GEM
Options:
-b, [--bin=Generate a binary for your library.]
[--no-color=Disable colorization in output]
View gist:4045084
1.9.3p194 :016 > puts Benchmark.measure { time = Time.now; 10000000.times { time.hash } }
1.270000 0.000000 1.270000 ( 1.278316)
=> nil
1.9.3p194 :017 > puts Benchmark.measure { time = Time.now; 10000000.times { time.to_s.hash } }
23.770000 0.000000 23.770000 ( 23.798103)
##
1.9.3p194 :028 > puts Benchmark.measure { str = "foo"; 10000000.times { str.hash } }
View gist:4022788
module Foobar
def hello
puts 2
super
end
# Why is Ruby allowing me to redefine this method? If you remove
# call to super then it doesn't actually prepend self to mod.
# Any use case for doing something different like overriding/prepending
# only certain methods (ex: methods starting with foo_) or something else?