Monday, May 16, 2011

Fun with QR codes

Ok, working on photo timestamping (forum), I've got 2 simple bash scripts:

- genQR.bash
- checkQR.bash

Using genQR is easy:

desktop:~/QR$ ./genQR.bash
stamp: 2011-05-17 06:01
hash: 659A54AB2E563038C5F77F3925A7F977D81EEB01
QR: http://qrcode.kaywa.com/code/32/659A54AB2E563038C5F77F3925A7F977D81EEB01


What it does is, generates a timestamp '2011-05-17 06:01' (utc time), salts with with a secret hash and then takes the resulting hash.

The timestamp has a minute resolution, so re-running ./genQR.bash within the same minute gives the same hash. The idea is to publish the stamp and resulting hash far and wide. People wanting to timestamp documents can include the hash before singing the document.

Using checkQR is also easy:

desktop:~/QR$ ./checkQR.bash '2011-05-17 06:01' '659A54AB2E563038C5F77F3925A7F977D81EEB01'
Encode string: 2011-05-17 06:01 | A2778CC2A16EEC5CC8EB867C30D550BB15B2A6BC
Right answer: 659A54AB2E563038C5F77F3925A7F977D81EEB01
Your answer: 659A54AB2E563038C5F77F3925A7F977D81EEB01


The (encode string) is secret, and should never be seen. But the other two lines are easily used to verify the timestamp.

The exciting part comes with how easily it is to timestamp images. The QR url from genQR.bash gives the following QR code:



And with a bit of scripting, we should be able to validate the timestamp of photos as long as the QR code is somewhere in the background (and of sufficient quality)

Check it out! Here's a picture of the QR code

Decode it here


Raw text 659A54AB2E563038C5F77F3925A7F977D81EEB01
Raw bytes 21 41 13 33 e3 94 e6 86 81 ce 21 c4 7a 21 55 45 28 48 05 f3 92 ab 0a 12 51 07 6a 04 00 80 ec 11 ec 11 ec 11
Barcode format QR_CODE
Parsed Result Type TEXT
Parsed Result 659A54AB2E563038C5F77F3925A7F977D81EEB01

Bitcoin and Technical Analysis

In the spirit of keeping the TA people accountable, I feel the need to point this prediction out.

And the outcome:



Although, its unclear what the timeframe in the prediction is, bitcoin certainly isn't following that red line...

I don't know much about technical analysis, but I'm skeptical. I'm willing to admit it might have some predictive value, but I would need to be convinced it outperforms other models.

Loved this cartoon



From the New Yorker's The Secret Sharer - Is Thomas Drake an enemy of the state? which is also great.

Sunday, May 15, 2011

My preferred way to backup a bitcoin wallet

I encrypt it and email it to myself. In the email, I put decryption instructions (minus the passphrase, of course)

What I wanted was cross-platform decryption instructions, so that in a pinch, I could get my wallet from anywhere (Mac, PC (with cygwin) or Linux) and use it.

Here's what I've come up with, courtesy of lifehacker.

WARNING: If you haven't done this before, you should probably have a read through here first to get an idea of what exactly it is your backing up.

Then, shutdown your bitcoin client, and make a copy the wallet.dat and place it in a new, working folder.

Let's take the MD5 hash now, before we mess with it


> md5sum wallet.dat
f802a7fa2c7119cf15385b282443eb0f wallet.dat


Now, think of a passphrase, and encrypt.


> openssl des3 -salt -in wallet.dat -out wallet.dat.des-ede3-cbc

enter des-ede3-cbc encryption password:


Now rename the wallet.dat file to a backup before decrypting:


mv wallet.dat wallet.dat.orig


And decrypt:


> openssl des3 -d -salt -in wallet.dat.des-ede3-cbc -out wallet.dat

enter des-ede3-cbc encryption password:


Finally, check the MD5 of the newly decrypted wallet.dat:


> md5sum wallet.dat
f802a7fa2c7119cf15385b282443eb0f wallet.dat

What's New in the World of Bitcoin

1) Looks like the price has yet to stabilize after its first major correction. Google trends will continue to be informative, I believe. If the search volume stabilizes or rises, I predict the first major correction is soon over. If it falls, there's more to come.

2) The first issue of the Bitcoin Sun is out! (On twitter @TheBitcoinSun)

Contents (amongst other things):

- Unfairness and Pizza: The Key of Bitcoin’s Success?
- From Alice to Bob: A not so simple introduction to bitcoin’s inner workings.

3) Bitcoin Price/Difficulty, over time. (HT: @obinine) Would love to autocorrelate these 2!

Friday, May 13, 2011

The Great Bitcoin Roadtrip

@TheRealPlato is travelling across America, spending nothing but bitcoins!

Check out his progress on his blog.

Help him out on his Google Map.

Bitcoin-otc quickstart guide

Here's how to get quickly up and trading on bitcoin-otc on Ubuntu.

1) First off, connect to the IRC channel here. Choose a username.

2) Start a private chat with the gribble bot, in the IRC window, so you don't flood the channel messing about. All future IRC commands are to be entered into this private chat with gribble.

/msg gribble ;;help

3) Generate a gpg key (if you don't already have one). See here for details. At a command prompt, type:

gpg --gen-key

4) Publish your key.

gpg --list-keys --keyid-format long

Look for something like:

pub 4096R/46ED38A2A668A578 2011-02-18

Take the 16 digits following the slash, that's the KeyID. Now push:

gpg --send-keys --keyserver pgp.surfnet.nl 46ED38A2A668A578
gpg --send-keys --keyserver pgp.mit.edu 46ED38A2A668A578


5) Register with gribble, back in the IRC chat window with gribble:

;;gpg eregister Nick KeyID

After registering, use eauth to authenticate


;;gpg eauth BobJones


6) Gribble will spit back a http:// url. Copy that and run:

wget -O - http://bitcoin-otc.com/otps/46ED38A2A668A578 | gpg --decrypt

7) Now take the output and verify with gribble:

;;gpg everify freenode:#bitcoin-otc:6132ffd1c3c4468e40303d844f3e30661bc34617054f7cc5e3fa03c8b41c376e


You should now be authenticated! Happy trading! Some useful gribble commands:

See the current exchange rate:

;;bc,mtgox

See orders for canadian dollars:

;;book cad

Privately message someone online:

/msg BobJones

Leave a message for someone offline:

;;later tell BobJones Hey there big guy!

Wednesday, May 11, 2011

On Anarchism, Bitcoin and the Impending Revolution

This article exactly captures my excitement about the future. Worth reading the whole thing. Some juicy parts:

The reason that government is everywhere is that government wins. It's a Darwin thing. The reason that government wins is that a bigger ship is more seaworthy, and a big enough ship needs a thousand builders, and a thousand builders need an organizer to deal out paychecks, and sooner or later the organizer's paychecks become more important than the ship. The ship is still made, of course, and it crosses the world conquering savages for loot. But in the end, the organizer is a king, and we all swear the pledge of allegiance. The original reason for building the ship? Shit, no one remembers. Anyways, here we go. (Ever watch Cube?)


And:
Bitcoin doesn't need to be legal to operate. And it's encroaching on the sort of grand scale project space that first gave governments their legitimacy. I think this is significant.

Tuesday, May 10, 2011

Learning about QR codes

So now I'm motivated to look into how easy it is to use QR codes....

1) Create your own QR code easily
2) A list of QR decoders
3) Online QR decoder

EDIT: As usual, Google does it the best

Web Buisness idea: Time Verification Service

So Here's a silly idea:

You want to verify a photo was taken a a certain time. You could go get a copy of todays paper, or you could go to phototimestamp.org (just registered it)

When you go there, a QR code (similar to this) is generated.

Then just take a picture of whatever, with the QR code in the background (changed every 15 minutes).

Then the other user can submit the image, and the time that it was claimed to be taken at, and the website will spit back true or false.

Bitcoin and Gambling

With the feds seizing pokerstars, full-tilt poker, and absolute poker Alternative modes of gambling will surely be on many's mind.

Bitcoin and gambling are a natural fit.

Play poker with bitcoins. Apparantly, the industry standard rake is 5%. With bitcoins, it's 1%

You can also do sports betting with bitcoin.

Then there's the BitCoin lottery. It's currently down for (among other reasons, including a bug) not having many players. I take this as evidence of bitcoin user's intelligence.

Oh, and if bitcoin weren't easy enough, now there's instawallet

EDIT: You can also play roulette with bitcoins

TIL: In-Q Tel

Today I learnt about In-Q Tel, the venture capital arm of the CIA.

In their own words (pdf):

IQT’s initial mandate [was] to identify software innovations in specific areas such as natural language processing, geospatial analysis, and machine translation, among others, and adapt and deliver them for use by our government customers.


Later...

IQT’s mandate has expanded over the past ten years to also include physical and biological as well as security technologies, our focus on software and infrastructure endures.

Monday, May 9, 2011

Iatrogenesis: the negative marginal rate of return and moral hazard in healthcare

What is Iatrogenesis?

The medical establishment has become a major threat to health. The disabling impact of professional control over medicine has reached the proportions of an epidemic. Iatrogenesis, the name for this new epidemic, comes from iatros, the Greek word for ‘physician’, and genesis, meaning ‘origin’.


Healthcare spending is making people less healthy:

To have any hope of controlling healthcare costs, doctors will have to raise their diagnostic and treatment thresholds. And higher thresholds would be good for more than the bottom line. Less diagnosis and treatment of disease would return millions of Americans to normal, healthy lives. That's right: Higher thresholds could well improve health.

Endgame for the EU?



From Der Spiegel:

Greece's economic problems are massive, with protests against the government being held almost daily. Now Prime Minister George Papandreou apparently feels he has no other option: SPIEGEL ONLINE has obtained information from German government sources knowledgeable of the situation in Athens indicating that Papandreou's government is considering abandoning the euro and reintroducing its own currency.


Then there's the always insightful Tyler Cowen, writing for the New York Times

…if any one euro zone country were to start exiting the euro, there would be bank runs on the other fiscally ailing countries. The richer European Union nations know this, and so they are toiling to keep everyone on board. But that conciliatory approach creates a new set of problems because any nation with an exit strategy suddenly has enormous leverage. Ireland or Portugal [or Greece!] need only imply that without more aid it will be forced to leave the euro zone and bring down the proverbial house of cards. In both countries, aid agreements already are seen as a “work in progress,” and it’s not clear that the subsequent renegotiations have any end in sight, because an ailing country can always ask for a better deal the following year.

Saturday, May 7, 2011

Things to do with bitcoins

Fun things to do with bitcoins

1) Get a website made (it doesn't look nice, but the portfolio is decent)
2) Install a dead-drop in Montreal (TIL: about dead-drops)
3) Buy a specific linux distro for mining bitcoins (WIP)
4) Web hosting, for that website you just made. (bitcoin-otc promo code for 20% recurring discount on majority of services, apparantly....)

The best bitcoin market I've found is here. Then there's BiddingPond. Reddit has one too, but it's pretty dead. Bitbid looks promising...

Thursday, May 5, 2011

Ingenuity Everywhere

There's some amazing people out there doing some aweome stuff!!

1) Mission Liberty
Devoted to making libertarian/anarchist/agorist activism happen.

2) Human IPO
Accelerate your startup!

3) Clean Tech Accelerator
To help humanity address its energy needs for the 21st century, using environmentally, socially and economically sustainable methods

4) The $300 House

5) A 1sqkm artificial floating island of solar panels?

On Gardening

I know nothing about gardening. I wish I did. Someday I'll get into it. Here's what I'm keen to try:

1) Lasagna Gardening: The basics of a non-traditional method of gardening that is organic, earth friendly and easy.
2) Howto grow 100 lbs of potatos in 4 square feet
3) Vertical vegetable gardening [2]
4) Window gardening