Skip to content

Instantly share code, notes, and snippets.

View DavidJRobertson's full-sized avatar

David Robertson DavidJRobertson

View GitHub Profile
@DavidJRobertson
DavidJRobertson / dbss.cpp
Created April 13, 2012 06:33
Dropbox screenshot tool (rather cobbled together, basically imitates puush.me)
/* Dropbox Screenshot Tool Thingy
* ==============================
* David Robertson - http://davidr.me/
*
* Dependencies:
* - ImageMagick
* - Magick++
* - xclip (on linux - on a mac, be sure to change the COPY part of the settings below)
* - xdotool (required for taking screenshots of the active window only)
* - notify-send (for on-screen notification that a screenshot has just been taken)
puts "XOR tool"
hexvals = Array.new
puts "Enter first value in hex: "
hexvals << gets.chomp
puts "Enter second value in hex: "
hexvals << gets.chomp
vals = Array.new
class String
def last(n)
self[-n,n]
end
end
require "digest"
def hash_message(message)
sha256 = Digest::SHA2.new(256)