So it’s been a while since I’ve talked about bitcoin and I’ve recently gotten more interested now that the prices have grown significantly. So I started explaining it to some friends at school and have gotten them interested as well. So of course I wanted a nice and custom key to show off, and it’s really quite easy with tools like vanitygen by samr7 over on the bitcoin forums which is the tool that we will be using for this post.
Because it’s actually doing alot of math to figure out (or more correctly guess) at the key, the longer you want your custom key to be, the longer you will have to crunch these numbers so don’t get too crazy with it.
The tool has several options but most of them won’t be used, in fact I only use one of the possible flags below, but there are more, you can view them by running vanitygen.exe with the “-h” flag, or just save this as something like help.bat in the same folder as vanitygen.exe and double-click the .bat file to run the help command for you.
Now that you have read the options the batch file below might make more sense, we are going to ask you for the pattern you want your custom key to have, and decided if you want it case-sensitive which takes MUCH longer, and might have strings that are not allowed, but it’ll error out if it does so you can try something different.
So save this file as something like vanity.bat in the same folder as vanitygen and run it. (Change the highlighted lines 19 and 23 to reflect the executable you are going to use for your system. (ie: if on a 64 bit system you would use vanitygen64.exe, on a gpu you would use oclvanitygen.exe)
echo You can always press ctrl+c to stop this script from running.
set /p Name=Enter your desiered pattern (The leading 1 has been added for you): 1
set /p ConfirmName=Your pattern will be 1%name% Is this correct [y/n]?:
if "%ConfirmName%"=="" (GOTO GETINPUT)
if "%ConfirmName%"=="y" (GOTO STRICTNESS) else (GOTO EXIT)
set /p Eieye=Do you require your pattern to be CaSe SenSitvE [y/n]?
if "%Eieye%"=="y" (GOTO CASEYES)
if "%Eieye%"=="n" (GOTO CASENO) else (GOTO EXIT)
Here is what the output of the script does (note, I’ve highlighted the user input for clarity, there is no color in the actual script results, and No this key should NOT be used!):
Then create a shortcut on your desktop for vanity.bat and change the icon to something that you prefer, I’ve added the image I use below for fun, and then just run this anytime you (or a friend) want a custom wallet key!
As for wallet’s, I use the Armory wallet but for most users I would recommend multibit as it’s much faster, and much smaller, but you do give up some freedom and security relying on others where armory can offer a true TNO security standpoint, just my 2 bitcents on that topic, now get mining!
So if you’ve read my previous post‘s I’m running the latest stable nginx server here on my local laptop to serve up my own search page
But I left out a major point… You will need to open a command prompt and enter the C:\nginx directory and start nginx each and every time you bootup. That’s no fun even for a geek like me that spends half of his time on windows in an ssh terminal running back to one of my many linux pc’s but that’s still something we need to fix and like now!
So I did some digging around on google, and all of the post’s I’m reading say to use the .bat file located in the install, but the latest stable release of nginx DOESN’T INCLUDE THESE or ANY .bat FILES! Needless to say, that meant more work, and a quick intro into the quick grace at simple programming to have things done for you! So, Let’s build the start-nginx.bat file! (Note I’m running Windows 7 Ultimate Signature Edition, so this should work for you as well but let me know in the comment’s if it doesn’t!)
[codesyntax lang="winbatch" lines="normal" title="start-nginx.bat" blockstate="expanded"]
echo Starting nginx
We don’t need anything neat or pretty on the start up as we just want it to run with minimal interference to our start up routine (remember this will be automated later) Also note, that this .bat file needs to be in the C:\nginx folder along with nginx.exe for it to work properly!
Here’s the pimpish part, the shutdown .bat file. (I mostly just modified the file I found here) but it works great!
[codesyntax lang="winbatch" lines="normal" title="stop-nginx.bat" blockstate="expanded" highlight_lines="11"]
echo Stopping Nginx…
set /p yesno= Would you like to kill nginx? [y/n]:
if “%yesno%”==”" (echo You didnt enter anything – try again..) & (GOTO SETYESNO)
if /I “%yesno%”==”n” (GOTO NOKILL)
if /I “%yesno%”==”y” (GOTO KILL) else (echo Unrecognized command – try again) & (GOTO SETYESNO)
echo Killing Process…
nginx -s stop
echo Aborting kill…
There’s also an interesting idea on turning nginx into a window’s service if your into a bit more of a hacking mood then I was at 2:30 am writing this.
Also you can change the commands I’ve highlighted on line 11 with any one of the commands from the nginx site such as let nginx shutdown gracefully, reload itself etc. just remember that each line will execute in a command prompt as if you typed it so let your minds wander on this one! .bat files are your friend! (also as a side note if you don’t want to have to click any button to continue replace pause on line 18 with exit)
Now let’s get nginx running on our bootup. Right click the start-nginx.bat file and select “Create Shortcut”. Name it whatever you like and then right click the shortcut you just made and cut (or copy) the shortcut and let’s add it to our startup folder in the all programs list.
Click your start menu, choose all programs, scroll down to the startup folder, right click it and choose “Explore” or “Open” and paste your shortcut into this folder. (allow any prompt’s that windows throws at you for needing admin right’s) and you should be good to go!
If this worked for you or you have any questions that google can’t answer or just want to say thanks please feel free to post a comment! That’s why I do this!!! You’ll notice the lack of ad’s or shameless begging for donations, all I want is your thanks!