part 2 – how to log in to your amazon ec2 dogeminer

In part 1 we covered the groundwork you need in order to get a miner instance up and running on amazon’s servers. Now we are going to log in and put your info to work.

Before we log in to your instance, we need to set up a worker in your pool. Most will set one up for you by default, but you want to double check. Log in to whatever pool you selected. I suggested doge.hashfaster.com. Go to the worker section on the left side of the page. you should have a section that has worker configurations in it.
pool workers
It will have your username followed by a box, and another box for a password. Make easy to remember, short entries. The general practice is to use numbers in the first and a single character in the second. The only harm someone could do with this info is that they could mine for you! Make it simple. You don’t want to mine and have it not get credited to your account. Look at the worker info again and remember it. It should be in the form of username.1:password for instance, mine is tinyenormous.1:x

In order to log in to your instance you need
-your key (from amazon)
-the ip address of the instance

There are a lot of ways to ssh, but I’m going to use the terminal.

First I’m going to change the permissions on the key.

chmod 400 /path/to/your/key

next I’m going to wait until the instance shows up in the dashboard and copy the ip address.

Then I type

ssh -i /path/to/your/key ubuntu@PasteYourIPRightHere

and you should be in! On log in, the first prompt will ask you for your pool server address. This will look like
stratum+tcp://stratum-us.doge.hashfaster.com:3339
note that it begins with stratum+tcp and ends with :3339. Those things may change from server to server, but it’s important to have them in there and correct.

Next up is your WORKER username and password.
Enter it exactly as I showed it above
username.1:x

Hit return and your miner will spring to life! In order to check on it’s progress type
cat minerd.log
and it will read the log that your miner is writing.

After a few minutes your pool dashboard should show your speed on it. The pool dashboard number is often off, and should only really be used in order to see if you have successfully connected.
Screen Shot 2014-01-21 at 1.14.02 PM
This is obviously just the beginning of cloud mining, so feel free to poke around, fire up more instances, or tweak the settings!
(if this guide has proven useful to you, feel free to tip me in dogecoin at DB7UPpjsUqdWvDPxJcUdnZ3Ymtb4K2KBNQ or send me any type of coin via cryptsy at c99b5ef67fdd3f7e3900b3e8d52f1e37c1197a00 )

How to mine dogecoins with amazon’s ec2 servers. Mining in the cloud!

I’ve seen a few tutorials out there showing how to mine dogecoins, bitcoins, or litecoins in the cloud. None of them were as complete as I wanted them to be, so I’m putting this post together.
Dogecoin Startup screen
WHY mine using amazon’s servers? Good question. Generally setting up a mining computer will be cheaper in the long run, but it involves more technical know-how and it involves a lot more money. You have to pick out the ‘right’ motherboard, graphics card, hard drive, a case, and then you have to put it all together and get it to work. With Amazon’s servers, you could be up and running in 20 minutes. Using your own hardware also means that you are capped at a certain rate. If the price of dogecoin increases 200% tomorrow, then you could simply fire up more servers. It would take a lot longer to order up the parts for more mining computers. The downside is that amazon’s prices fluctuate, and amazon will rent you a computer that will barely break even, or not make a profit. That onus is on you in order to do the math.

HOW to mine dogecoins on amazon.

1 – Download the dogecoin client – from here. Run it and let it sync. It will take a long time (days!) but it will run in the background and you don’t need to wait for it to finish in order to continue on.

2 – Get your dogecoin address – In the dogecoin client go to the third tab in. “Much Recieve” Select the only entry and hit the “copy Address” button. This string of characters is similar to your checkbook routing number. This is where you will get paid for your mining. Save this number somewhere, you will need it later.
dogecoin wallet

3 – Join a pool – Mining is a lot like playing the lottery. You try and try and eventually win. If you have an underpowered machine, then it may take a VERY, VERY, long time for you to ever find a winner. Consequently, people have created “pools” where everyone mines together and then splits the winnings based on how hard they worked. This is generally the better way to do it, as you will be paid more consistently. My current favorite is hashfaster.

4 – Join an exchange – Cryptsy will allow you to trade your dogecoin for bitcoin, litecoin, or a lot of other coins. This will let you hedge your bets and give you a place to swap one coin for another. Join here, we’ll come back to this in step 2.

5 – (finally!) Set up an ec2 account – Sign up here for the ec2 free tier. Don’t worry, they won’t charge you for anything until you start renting servers.

5a – Create an instance – Once logged in to ec2, click on “Instances” on the left side, and then on “Launch Instance” on the top.
Launch ec2 instance

5b – Find my AMI – On the left side click on “Community AMIs” and then type tinyenormous into the search box. I should probably explain what this means. I have configured a machine image so that it will start mining as soon as it starts up and is configurable. You could do this if you wanted to, but it is easier to simply use the one that I have already set up.
Search for “TINYENORMOUS” and you should find mine. Just to be safe, here are the specific ID numbers of the authentic ones.

ami-2b5f6242 – east coast
ami-8ae4d6cf – california
ami-eaddbcda – oregon
ami-f3ac32c9 – sydney
ami-e60553b4 – singapore
ami-a3a4cda2 – Tokyo

find my AMI

5c – Choose an instance type – In this section you will pick the “computer” that you will be renting. This AMI is going to be cpu mining, so the number of vCPUs is the most important thing. Generally you will get ~4.5k per cpu. Amazon has configurations that run anywhere from 1 to 32 cpus. It doesn’t matter if you have one machine running 32 cpus or 32 machines running one, so check the prices and find the sweet spot. In order to find the prices you can do two things. The first way is to select a configuration and hit the next button. Then hit the “show spot prices” radio button on the next screen. This shows you the current pricing for that configuration. The other way is to open up a new ec2 tab in your browser and click “spot requests” on the left side and then “pricing history” on the top. That way will show you a graph of prices over time.

Screen Shot 2014-01-21 at 10.44.07 AM

spot prices graph

5d – Configure your instance – Now you have picked the best value of $/cpu and you know what the market rate is. In the next page, titled “Step 3: Configure Instance Details” click on the “request spot instances” button and put in a bid equal to or higher than the minimums. You can limit the amount of time that the request will be valid for by putting a time into the “request valid from” and “request valid to” fields, and you can click the “persistent request” button if you want the instance to launch again after it is shut down.
Here is an interesting thing about ec2 bidding. If the average price goes above what you are currently paying then your computer will get shut down. The only way to prevent this is to either big well above the minimum bid, or to not bid. If you don’t click the “request spot instance” button, then amazon will charge you top-dollar for every instance but won’t kick you off.

configure instance

5e – Once you have your bid figured out, hit next until you get to step 6 (on amazon). In this page you will configure your security settings. You don’t want anyone in the world to be able to log in to your instance, so you are going to set it to only allow connections from the i.p. address you are using. Go to whatismyip.com and copy your ip address. Now go back to amazon, hit “add rule” select ssh, and then paste your ip in the box all the way to the right. Amazon will suggest you add /32 to the end and you should do it. If there is a rule above the one you created then delete that by hitting the circle with an x in to the right side. Now hit “review and launch” on the right side.

5f – The last step in getting a spot server bid in is to set up a key pair. This is a small file that helps amazon verify that you are indeed the owner when you connect to the computer. On the popup select “create a new key pair” then download it, and click on the “I accept” terms and conditions.

5g – Congratulations! You have now submitted your bid. If you go to spot requests you should see your request being processed. Provided you bid high enough it will be fulfilled and should show up under “instances” shortly. If it says “price-too-low” under status then your bid wasn’t high enough to win.

In part 2 I will show you how to log in to the instance and update it so that it is mining for you!
(if this guide has proven useful to you, feel free to tip me in dogecoin at DB7UPpjsUqdWvDPxJcUdnZ3Ymtb4K2KBNQ or send me any type of coin via cryptsy at c99b5ef67fdd3f7e3900b3e8d52f1e37c1197a00 )

How to detect page loading status using applescript and chrome

This is far from rocket science but I haven’t seen it posted so I’m going to put it here for posterity. This is how you can detect if a page is loaded in chrome with applescript. This is a subroutine, so you can put it at the end of your program and call it with this line

checkForLoading()

Ok, here’s the subroutine.

on checkForLoading()
# checks chrome to see if the frontmost tab is loaded
tell application "Google Chrome" to set chromeLoading to loading of active tab of window 1
repeat while chromeLoading = true
delay 1
tell application "Google Chrome" to set chromeLoading to loading of active tab of window 1
end repeat
end checkForLoading

If I recall correctly, wordpress messes up quotes. If this doesn’t compile then replace the quotes and try again.

Timelapse shutter speed rule of thumb explained

The widely accepted rule of thumb for shooting timelapses is that your shutter speed should be 1/2 your interval. What this means is if you are shooting one shot every 3 seconds, then your ideal exposure is 1.5 seconds.

WHY?

The point of shooting timelapses is to end up with video at some point, right? Film cameras have dealt with this issue for some time now. In a film camera, a piece of film rapidly advances one frame, stops, is exposed to light, then the exposure stops, the film advances and the whole process begins anew. This process can occur 12, 24, 30 or more times per second. The camera needs some time to move the film into position, so it spends some time with the shutter closed (moving film) and then it spends some time with the shutter open (exposing film) The standard for a long time now has been to spend half of the time exposing, and half of the time moving film (not exposing.) On film cameras the shutter is often on a shaft and rotates through the film plane. Thus a 180 degree shutter literally is a half circle that blocks the film from getting light half of the time.

180 degree shutter

WHY?

Well, that’s still a good question. Digital cameras can go from practically 0 degrees up to literally 360 degrees. The big difference is in what it looks like. Motion blur is what this is really all about. Regardless of your exposure or frame rate, a shorter exposure will have less motion blur on it. On the flip side of the coin, a longer exposure will have less action occur when the lens is ‘closed’ and it will look less strobe-like. The balance between those two things is how people decided on a 180 degree shutter, and that brings us back to shooting stills.

When shooting a timelapse, if your shutter speed is smaller than half of your interval then your video will start to look strobey. What I mean by that is that there is a continuity gap from one frame to the other. If the video is of a car driving, then the distance that the car moves between frames will increase and the resulting video will look jumpy.

If your shutter speed is larger than half of your interval you will end up with more motion blur. Trails will occur behind moving objects. This is generally less of a concern because our minds are much less confused by trails than by strobing. Strobing can be dissociative, while motion blur is more like an artistic statement.

In conclusion: Like all rules, this rule of thumb is meant to be broken but it can never be ignored.

Addendum: When you are shooting video in movie mode, this should also guide your shutter choices. If you shoot 720p 60, then you should have a shutter speed of 1/125, and if your are shooting 24fps, then it should be 1/50. Feel free to deviate but know what will happen if you do.

Using Cura on my Reprap

I got a message the other day on g+ from ultimaker letting me know that Cura was available for Macs. Cura is software that does both slicing and printer control. It has some cool features so I decided to check it out.

INSTALL –
The install went very smoothly. It searched for a python module that I didn’t have, then installed it for me. That was it.

CALIBRATION –
Calibration was pretty quick as well. Cura and slic3r both are front ends for skeinforge. EDIT – thanks Gary for the correction. They do a bunch of math behind the scenes so that you can tweak one number and have it ripple through all of the other things that number influences. Cura seems to be even simpler than slic3r, but in my experience that has been a good thing. I had to set my bed size, x,y,z, max length, nozzle size, filament, filament size, and possibly a few other things. There is a first run wizard that guides you through the things that you need to change. The one big sticking point is that you (strangely) need to put your extruder steps per mm into cura. I’m not sure if it was in the wizard. If it wasn’t then you can find it under preferences called “steps per E”

SLICING & PRINTING –
The slicer in cura is well laid out and labeled. It is a little slower than slic3r, but gave me better results. It also allows me to tweak things like speed (by a lot) and have much more consistent results.

COOL THINGS ABOUT CURA –
There is a project planner feature that is pretty awesome. It is a plater, in that it allows you to gang up multiple pieces in one print but it allows you to apply different slicing settings to each piece. Being able to print a wade’s extruder at .2 layers and the gears at .1 on the same bed is really awesome. The coolest thing about project planner is that you can control whether the separate parts are printed individually or all at the same time. I can’t count the number of times that a 3×3 grid of gears will have one gear come up and then it will eventually knock all of the rest free. I LOVE this feature.

There is also a gcode post processor in cura. This has been a staple of traditional cnc software for a long time. I love this. For example: cura was generating a M190 code in the startup. This means that it waits for my heated build platform to get to temp before moving on. I don’t like to wait that long as my apt is cold, and my bed heats up slowly. I was able to swap out all “M190” codes with “M140” and away I went!

BAD THINGS ABOUT CURA –
You can’t control the printer without sending a print to it. The overall print section seems to be the least developed part of the whole thing. You can’t select a gcode file to send without generating it in Cura. You can however generate it in cura, then edit externally, and then send it from cura. I have also had far more print freezes and line checksum errors in cura than in slic3r.

CONCLUSION –
I’m stoked on cura. I wish it had a bunch of other features, but it seems like it is developed by a person (? /community?) that has been continuing to add new features and push things. I’m sure that there are some things that I’ll use pronterface for. I may even do my slicing in cura and my printing in pronterface. Either way I am glad to have made the leap, and now I have another software tool in my toolbox.

Hack saturday – spend $25 free on amex @ small business

American express has a one a year campaign where they will reimburse you $25 if you register your amex card online and spend more than 25 at a participating small business. Just to reiterate, here are the two rules
1) register your (amex) card online at http://shopsmall.com
2) buy a minimum of $25 worth of stuff from an amex approved small business. Want to find one? Check out their online small business finder.

Just so you know that this isn’t “too good to believe” you can see that I did it last year and got a bunch of free gear from sparkfun.

So here is why this is hacky enough to go up on my blog. The small businesses don’t have to be local to you. They just need to be on the map. I’ve looked for a bunch of my favorite small open source hardware / reprap stores and have a small list. The most difficult part is that you need to know the store’s physical address, and their name according to amex. I’m sure that I have missed some just because they might have their cc account under a different name than their actual store name.

Here’s my list:
pololu
makerbot
inventables
artisans asylumn
matterhackers
protoparadigm
robotshop
hobby fever
DIY Drones (3d robotics)
you do it electronics

NOT eligible – post with the zip code and address if you can find that they are actually there. I would LOVE that.
shapeways
sparkfun :(
ponoko
adafruit
emsl
printrbot

It’s not too late to register, and I haven’t picked out my list yet. PLEASE post your thoughts for any hacker friendly small businesses that accept amex, or even better – check them out on the map and post back here

Canon 7D firmware 2.0 and 2.0.3 released


Canon released firmware v2.0.3 for the 7D recently. Go here to find it. It fixes some things broken by the 2.0 update.
The 2.0 firmware enables a bunch of new features. Here is the canon site explaining everything. My favorite options are the higher burst rate, higher max iso, and the manual audio levels.

Oh, and while you’re at it – check out Magic lantern on the 7D. It’s finally making some progress!!

Magic Lantern on 7D! with Video!

I was about to put up a post about the new 7D firmware v2.0.3 from canon being released, but it was eclipsed by some amazong news. Over on the Magic Lantern site it seems that User g3gg0 has figured out the weird dual-digic configuration and has been able to run a hello world test on a 7d! It is not a fully developed release (not at all) but it is GREAT news, and an awesome step in the right direction.

UPDATE – Magic lantern just tweeted this video. It mainly shows the overlay window, but it also shows focus trapping. Even a tiny step is great, but this is a HUGE STEP!

I’ll DEFINITELY keep you updated as this develops. I donated to Magic lantern a few weeks ago, but I’m about to re-up! Here’s that link again, just in case a little $$ will get this first release out the door faster!

CHDK Compatible Powershot SD series cameras


SD Series

The SD series is a slightly higher level version of the A series. They have nice metallic-looking rounded bodies. They have a very pocketable size, and they feel very good in the hand. Their battery life is somewhat a limitation due to their size and their batteries are generally tiny things with external chargers. These cameras can make for a great walk around point and shoot, or a platform for a more involved level of tinkering. With a big enough external battery they could make for a great motion detection photo system, and their small size means that you could tuck them in a dark corner and unobtrusively capture a timelapse or two.

———————–

[asa]B000AYKUTW[/asa]
[asa]B00064O89Y[/asa]
[asa]B0007TJ5OG[/asa]
[asa]B0007TJ5AK[/asa]
[asa]B000AYKUUQ[/asa]
[asa]B000EMWBT2[/asa]
[asa]B000ENPDSW[/asa]
[asa]B000EN0K94[/asa]
[asa]B000NK6J6Q[/asa]
[asa]B0015DPJ5W[/asa]
[asa]B001SER47Y[/asa]
[asa]B0011ZK6OS[/asa]
[asa]B000HAOVGM[/asa]
[asa]B000V20S3G[/asa]
[asa]B001G5ZTN6[/asa]
[asa]B0015DPJMK[/asa]
[asa]B000HAQ8EK[/asa]
[asa]B002LITT7E[/asa]
[asa]B000V1VG2O[/asa]
[asa]B002LITT5Q[/asa]
[asa]B001G5ZTWM[/asa]
[asa]B000NK8EWI[/asa]
[asa]B0012YC7AE[/asa]
[asa]B001SER48S[/asa]

Not linked – SD850
———————–

As with every camera purchase, you’ll need to make sure that you end up with an appropriate memory card (or two), a battery, and charger. If you buy new this is less of a concern, but a lot of these cameras are only really available on the used market so keep an eye out for what accessories are bundled with the camera.

Go Back to the CHDK compatible overview page

CHDK compatible Powershot A series cameras
CHDK compatible Powershot ELPH series cameras
CHDK compatible Powershot S series cameras
CHDK compatible Powershot SD series cameras
CHDK compatible Powershot SX series cameras
CHDK compatible Powershot G series cameras

CHDK Compatible Powershot S series cameras

S Series
The S series is where best buy thinks that the line between point and shoots and SLRs starts to get blurry. These are a bigger form factor, and the are not pocketable. They may look like a dslr from a distance, but the lens is not detachable. This series generally has a nice long optical zoom length but doesn’t win many style points. These cameras can be picked up pretty cheap (*used) because they aren’t the sharpest looking canons on the market. (body-wise, not image-wise) They still can have great optical quality and their larger size enables both larger screens and longer lasting batteries. If all that you care about is the picture then these might make a good tradeoff of price per pixel.



Not linked – S5

As with every camera purchase, you’ll need to make sure that you end up with an appropriate memory card (or two), a battery, and charger. If you buy new this is less of a concern, but a lot of these cameras are only really available on the used market so keep an eye out for what accessories are bundled with the camera.

Go Back to the CHDK compatible overview page

CHDK compatible Powershot A series cameras
CHDK compatible Powershot ELPH series cameras
CHDK compatible Powershot S series cameras
CHDK compatible Powershot SD series cameras
CHDK compatible Powershot SX series cameras
CHDK compatible Powershot G series cameras