Skip to content

Instantly share code, notes, and snippets.

View adelcambre's full-sized avatar

Andy Delcambre adelcambre

View GitHub Profile

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.

def blah
"test"
end
@adelcambre
adelcambre / foo
Last active December 20, 2015 02:29
asdf
asdf
asdf
asdf
asdf
asdf
@adelcambre
adelcambre / server.rb
Created September 26, 2013 17:27
A small bit of code to demonstrate the Sockets API in Ruby via a very tiny, very bad, web server.
require 'socket'
NOT_FOUND = "HTTP/1.1 404 Not Found\nContent-Length: 9\n\nNot Found"
OK = "HTTP/1.1 200 OK\n"
socket = Socket.new(:INET, :STREAM)
sockaddr = Socket.sockaddr_in(11080, '127.0.0.1')
socket.bind(sockaddr)
socket.listen(5)

Keybase proof

I hereby claim:

  • I am adelcambre on github.
  • I am adelcambre (https://keybase.io/adelcambre) on keybase.
  • I have a public key whose fingerprint is 1BE4 CF33 AB8C F585 CF98 9A63 52A4 7A77 8EDE D0B4

To claim this, I am signing this object:

@adelcambre
adelcambre / make_some_files.sh
Created September 3, 2014 20:52
Simple script to make lots of test files
for i in `seq 1000`; do
echo $i
touch $i
# or dd if=/dev/zero of=$i count=100 bs=1m
done
@adelcambre
adelcambre / 00_tokyo.md
Last active August 29, 2015 14:06
Surviving tokyo

Some basics on Tokyo

Your phone should work

Just like in Europe. It's the same normal international data plan for most carriers (I've done it on At&t and Verizon).

Cash is king

And you get cash from 7-11 (yes I'm serious). American cards very very frequently don't work. Especially in any sort of machine, particularly vending machines and the train ticket machines. Many atm's won't take american cards either. But, every single 7-11 (which are everywhere) has an atm which takes american cards. They sometimes say 7-i, or Seven and i holdings. It's all the same thing (7-11 is actually a japanese company, and they are everywhere). Other than 7-11, every Post office should have an ATM that works too, but they are way less common.

git config --global alias.lol "log '--pretty=format:%C(yellow)%h%Creset %cr %C(red)%d%Creset %s' --graph --decorate --branches"