Skip to content

Instantly share code, notes, and snippets.

View adelcambre's full-sized avatar

Andy Delcambre adelcambre

View GitHub Profile
def blah
"test"
end

Recursive encryption/decryption

The benefit of this approach is simple: The original passphrase can't be brute-forced from only the encrypted result without trying all the recusrive encryptions and knowing how many recusion levels were used during encryption.

Test

echo hello | red e world | tee hello-world.enc.txt | red d world

Now the hello-world.enc.txt file is "hello" encrypted recursively using sha512-recursive digests of the "world" passphrase.

@adelcambre
adelcambre / .gitignore
Created January 24, 2013 23:48 — forked from FND/.gitignore
*.pyc
@adelcambre
adelcambre / gist:4325305
Created December 18, 2012 05:26 — forked from schacon/gist:1
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
testing 00-metro
testing 00-metro
blah
@adelcambre
adelcambre / Gemfile
Created April 2, 2010 18:18 — forked from atmos/Gemfile
source :gemcutter
group :runtime do
gem 'sinatra', '~>1.0'
gem 'rack', '~>1.0.0'
end
# vim:ft=ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'httparty'
require 'pp'
TOKEN = 'token'
class Task
include HTTParty
/* Expanded form of a bookmarklet for extracting rev=canonical OR tinyurling a page */
(function(){
var url=document.location;
var links=document.getElementsByTagName('link');
var found=0;
for(var i = 0, l; l = links[i]; i++) {
if (l.getAttribute('rev') == 'canonical' || (/alternate short/).exec(l.getAttribute('rel'))) {
found=l.getAttribute('href');
break;
}
#!/usr/bin/env ruby -KU
require "rubygems"
require "dm-core"
DataMapper.setup(:default, 'sqlite3::memory:')
DataMapper.setup(:second, "sqlite3:///#{File.dirname(__FILE__)}/test.db")
class Customer
include DataMapper::Resource
def self.default_repository_name ; :default ; end