It's coded in Django, which helped a lot because I was able to use much of the built-in functionality. Right now it's still hosted on my home server, which is slow as molasses. Once Clustur starts getting used by people, I'll move it over to a WebFaction server. I'll also admit that it needs a bit of user interface tweaking, but for the most part everything is solid. I also have some great plans with which to extend this site, but I'll let it be a surprise when they are ready to release.
Over the past couple of months, I've been using what little free time I have to code a website called Clustur. It is located at http://clustur.com. The main page pretty much says it all, but it's basically a site for creating, learning, and sharing study material. I've recently used it to study for all of my exams this semester. Because it passed the test of exams for me, I can say it's helped me a ton during the process.
It's coded in Django, which helped a lot because I was able to use much of the built-in functionality. Right now it's still hosted on my home server, which is slow as molasses. Once Clustur starts getting used by people, I'll move it over to a WebFaction server. I'll also admit that it needs a bit of user interface tweaking, but for the most part everything is solid. I also have some great plans with which to extend this site, but I'll let it be a surprise when they are ready to release.
It's coded in Django, which helped a lot because I was able to use much of the built-in functionality. Right now it's still hosted on my home server, which is slow as molasses. Once Clustur starts getting used by people, I'll move it over to a WebFaction server. I'll also admit that it needs a bit of user interface tweaking, but for the most part everything is solid. I also have some great plans with which to extend this site, but I'll let it be a surprise when they are ready to release.
So apparently it's a thing to post workbench pictures. I guess I'll post mine too, mainly so I can remember it if my mom ever decides to move away. Anyways, here they are:
My computer desk |
Hydrogen rocket launcher to the left, broken VCR player to the right |
I don't know what I'd do without my junk bin. |
Some old electronic gizmos I have either made or taken apart. The contraption in the Zip-Lock box to the right is a PWM unit for my electrolysis unit I made a few years ago. |
This is the electronic parts keep in my room for prototyping. I made the drawers myself from a decade old sheet of plywood sitting in the basement. It was warped as hell so I'm pretty proud. |
My main workbench where I do all my soldering and stuff. Notice the old toaster oven my aunt gave me. I use it to desolder entire PCB's, but a slice of toast every now and then is good too. |
The workroom/workout room that's my second home. Notice the old treadmill and Bowflex that my family never uses :). |
I decided to upload many of my favorite programming projects I worked on years ago back in my Windows days. Yes, almost 1GB of code. The size of my old code directory totals almost 4GB, but I'm only including the most developed projects here. I'm releasing this code in the hopes that someone will find it useful. But please keep in mind that this is unsupported, undocumented, and (largely) uncommented code. Keep in mind that this code was written when I was about 12 or 13 so please don't use this as a measure of my current programming skills. I am releasing all of this code under the GNU Public License. Use it as you wish. Enjoy!
Here is the link!
Here is the link!
Many people are aware that they can SSH into their iPod or iPhone from their computers. The fact that the iPhone can be an SSH client is often overlooked, though. It can even authenticate with RSA keys. In this guide I will demonstrate how to set up an iPhone or iPod to SSH into a computer with an RSA key.
This guide assumes that your device is jailbroken, and the OpenSSH package is installed. OK, so let's get down to business. The first step is to SSH into your device using:
After that, you will be in mobile's home directory. You can then generate the local RSA key using:
You will need to just press enter at all prompts. You should now have a file called id_rsa.pub in the hidden .ssh directory. The next step is to copy the id_rsa.pub file onto the computer you want to be able to SSH into. The method does not matter here, and it may or may not be a two step process. The home folder of the user you want is the easiest place to put id_rsa.pub. Here is an easy way to copy it from your device to the destination via SCP:
At this point you can exit out of your device SSH session. Once id_rsa.pub is in the home directory that you want on the server, somehow log in as that user and run:
This will copy the public key into the list of keys that the SSH server will accept. After this step you can delete the id_rsa.pub file from your home folder. And that is the last step! If everything worked correctly you should be able to open up Terminal on your jailbroken iPod/iPhone and SSH into the computer you set this up on!
If you have any questions/comments, feel free to post in the comment sections. I'll do my best to answer.
This guide assumes that your device is jailbroken, and the OpenSSH package is installed. OK, so let's get down to business. The first step is to SSH into your device using:
ssh mobile@[YOUR_IPODS_LAN_IP]
ssh-keygen -t rsa
scp .ssh/id_rsa.pub username@hostname.com:~
cat id_rsa.pub >> .ssh/authorized_keys
ssh username@hostname.com
Apache subdomains with DynDNS or No-IP
8:16 AM apache, Bytes, dyndns, no-ip, server, subdomain, ubuntu 0 comments
When I was setting up my server, I was faced with the problem of configuring subdomains to work with a dynamic DNS service such as DynDNS or No-IP. I recently had a user on the Ubuntu Forums ask me how I ended up getting things to work, so I wrote this article to explain.
The first step is to configure settings with your dynamic DNS service. The following instructions are for No-IP, but they should be very similar to other services such as DynDNS:
After configuring your provider, next we need to configure Apache. In order to direct to the right location on the server, you need to configure Apache to know where each subdomain should be directed.
The first step is to configure settings with your dynamic DNS service. The following instructions are for No-IP, but they should be very similar to other services such as DynDNS:
- Navigate to the settings page for your domain.
- Find the "Enable wildcards" option and enable it. This directs all domain requests, no matter the subdomain, to Apache. Here is a picture for No-IP:
After configuring your provider, next we need to configure Apache. In order to direct to the right location on the server, you need to configure Apache to know where each subdomain should be directed.
- On your server, navigate to
/etc/apache2/sites-available
. This path is for Ubuntu, you will probably need to work with httpd.conf on other systems. This is where Apache gets information about sites and subdomains on Ubuntu.
- If you have not already done so already, create a new .conf file. Although you can name it whatevery you want, it is useful to name it with the format, [yourdomain.com].conf. This file will be used instead of
default
because it is easer (for me at least) to start from scratch for something like this.
- Open up the file, and add the following lines:
<VirtualHost *> DocumentRoot /var/web/www </VirtualHost>
This is the main entry, it directs all of the undefined subdomains (which we will define later - be patient) to /var/web/www. Of course, you will need to add your own configuration like log files; this is just the bare minimum to get you going. The path can be whatever you like. Note that your changes will not be added until step #6, so hang out.
- Now you can define other subdomains and their paths. Here is an example for foo.clustur.com:
<VirtualHost *> ServerName foo.clustur.com DocumentRoot /var/web/foo </VirtualHost>
Notice the only difference is the ServerName attribute. You can add as many of these directives as you would like into your .conf file.
- Now we need to enable the settings we just made:
sudo a2dissite default sudo a2ensite [yourdomain.com].conf
The first line disables the old default configuration file, and the second line enables your new .conf file, whatever you named it.
- Finally, we can restart apache:
sudo /etc/init.d/apache2 graceful
Now all of your subdomains should work! If you're stumped or have any suggestions, please feel free to comment - I'll do my best to help you out.
My server used to have a 16GB hard drive, and did not receive regular automated backups. I wanted to upgrade the drive to an 80GB one and use the old drive for automatic backups. This switch required that I somehow move the entire server installation from the old to the new, larger drive. So I decided to use a tool called Clonezilla. I cloned the old drive onto the new drive, and set the new drive to the master. Booting up with the new drive worked fine. I put in the old drive (which still had the server installation) as a slave for backups. It was then that I ran into an interesting problem: no matter what I did, the old drive would always boot instead of the new one. After some probing, I found out that GRUB was run on the new drive, but it always pointed to the old drive. After about 6 hours of banging my head against the wall, I finally figured out that the UUIDs for the two drives were the same since they were cloned. Instead of using the generic
For reference, here's the steps to change a duplicate UUID:
If some of you are wondering, this is the source of the recent downtime my server went through. The sites that were affected included this one, and my NXT++ and Linux4nano wikis. The sites were on and off for about a period of 24 hours. I hope this short tutorial helps some people solve the problems I experienced.
(hd0,0)
, the Ubuntu distribution uses UUIDs by default to point to the drive that should be booted from. The UUIDs were not so universally unique anymore, and GRUB got confused and booted the old drive. So I guess the moral of the story is always make sure you change the UUIDs whenever a cloned drive is used. Anyways, sorry if this notice came too late. I hadn't expected to run into such trouble.For reference, here's the steps to change a duplicate UUID:
- Run
uuidgen
to generate a new UUID.
- Type in
tune2fs /dev/hdaX -U [newuuid]
to actually update the partition's UUID. Be sure to replacehdaX
with the correct partition and[newuuid]
with the UUID given by uuidgen.
- Verify that the UUID was changed properly with
vol_id /dev/hdaX
.
uuidgen | xargs tune2fs /dev/hdaX -U ; vol_id /dev/hdaX
. If you just need to clear out the old drive with the duplicate ID, reformatting it would do the trick, too.If some of you are wondering, this is the source of the recent downtime my server went through. The sites that were affected included this one, and my NXT++ and Linux4nano wikis. The sites were on and off for about a period of 24 hours. I hope this short tutorial helps some people solve the problems I experienced.
10 ways to learn how computers really work
9:37 AM Bytes, linux, list, programming, server 0 comments
So you know how to install Microsoft Office, upgrade drivers, and maybe even do a little overclocking or programming here and there. But have you ever wanted to know more about a computer - how it really works? Here are just a few ways that you can learn a bit more about the mysterious machine.
- Open up your computer
This is a fun, interactive way to learn what's really under the hood. You can learn a lot by opening something up and picking out what the different parts do. Here is a link that explains some of the details. Although opening a computer might be a little intimidating for some people, keep in mind that computer parts are very durable, even if you have a laptop. It's also safe, as long as you unplug it from the wall first! :-)
- Set up a home server with an old computer
Pretty much everyone has at least one old piece of crap computer laying around. One of the best uses for a computer like that is to set it up as a home web server. It can teach you a lot about the Internet and also let you host your own site!
- Install Linux
This can teach you tons about how a computer boots and what an operating system really does. Installing a Linux distro like Ubuntu is good since everything is open source. Linux also exposes many advanced and low level functionality that Windows and OSX try to build a wall around. By using Linux, you can tinker and examine with parts that are hidden in other operating systems.
- Upgrade your PC components
Has your computer gotten too slow to run the latest games or applications, or do you just want a general speed up? Instead of buying a brand new $500 computer, try upgrading individual components like the RAM, graphics card, or CPU. This can be much cheaper, and is not as difficult as you may think.
- Learn a low-level programming language
Everything that runs on a computer was written with a programming language. Low-level languages like C and Assembly teach you the most because they are more connected to the computer's memory. C is a great language to learn, but if you really want to understand computers, learn Assembly.
- Do things the 'manual' way
In a world of automatic everything, it is nice do do things the manual way every once and a while. Too much automation can cause you to forget what really happens in the background. Try mounting your flash drive manually, or compiling and installing that latest snapshot from source. Who knows? You might end up needing to do these sorts of things manually if something is not working.
- Write a barebones kernel
What better way to understand an OS than to make one yourself! Making a simple kernel is not as hard and scary as many people think it is. Of course, if you want to make your kernel able to do something useful, be prepared to do a lot of reading. Here is a great place to start out with OS programming.
- Read a book on digital electronics
It's hard to understand a computer if you don't know how different computer parts can communicate with each other. I highly recommend Digital Electronics Demystified, because it teaches you all the essentials. You can also use this knowledge to build some neat circuits.
- Program a microcontroller
This requires a light background in electronics, but programming a microcontroller can be fun and useful. You can program microcontrollers in C or Assembly. You can also make a bunch of neat circuits with it, too.
- Read the book 'Code' This is a really great book about how computers really work. You can find a review of it here.
Just hours ago, Wolfram|Alpha was launched. If you have not been there already, check it out! This revolutionary site was just too exiting for me not to write about it. Wolfram|Alpha essentially makes libraries and libraries of knowledge available at a click of a mouse. Wolfram|Alpha is not a search engine, it is completely different and unique. You won't know it until you try it. This definitely won't replace Google for me, since the two products solve two different issues. Nonetheless, it will definitely be useful for school stuff. I'm not sure if it has much appeal for the normal Internet users, though.
Here is a link to a demo by Wolfram himself.
Here is a link to a demo by Wolfram himself.
Enabling advanced searching in Drupal
11:21 AM advanced search, Bytes, drupal, enable, search 0 comments
Enabling searching in Drupal is easy enough, but a lot of people have trouble enabling the advanced searching capabilities in Drupal. Once an administrator enables a search box, he or she will be able to access the advanced search form on the search page. The problem, however, is that normal and unregistered visitors cannot see it.
To fix this problem you need to navigate to Administer -> User Management -> Permissions. Scroll all the way down to the 'search module' section and check the two checkboxes for advanced searching like so:
If you just want registered users to access advanced searching, just check the rightmost box. Well that's about it! Now even non-administrators can use the advanced search in Drupal:
If you just want registered users to access advanced searching, just check the rightmost box. Well that's about it! Now even non-administrators can use the advanced search in Drupal:
Finding a power supply for electrolysis
10:55 PM atx, electrolysis, power supply, psu 0 comments
When I started getting interested in electrolysis, I faced the problem of finding a power supply suitable for the high currents required. At first I was using wall-warts that could only supply an amp or so. My electrolysis units started consuming more and more current, so I burnt out about three of those. I then decided it was time for me to get a better power supply. I had heard of many people using car batteries, but while those can supply a lot of current, they are expensive and cumbersome to charge. If you do use a car battery for electrolysis, you basically have to get a deep-cycle one to prevent damage when it is drained. I also searched for bench power supplies meant for electronics, but those were too expensive and did not provide enough amps. Bench power supplies are very regulated, which isn't that much of a deal when you aren't dealing with sensitive electronics. I finally stumbled upon a solution that would satisfy all my needs: a computer power supply.
A computer power supply is cheap, and powerful. Computer PSUs also provide the voltages I need, such as 5 and 12 volts. There are varying degrees of quality when it comes to power supplies. There are extremely regulated, stable, and expensive power supplies intended for sensitive computer components, and there are cheap power supplies that aren't so regulated and can pose a threat to the electronics they power. I would never put a cheapo PSU in my computer, but they are perfect for the brute force needs of electrolysis. I picked up a 450W ATX PSU on eBay for only $30 USD. 450W is plenty for my generator, but if you have a huge one, I would recommend getting a higher wattage or better yet just get a second one. You should find out the amperage your generator consumes to find out what power supply fits your needs. Be aware that the different rails (5V, 12V, 3.3V) all supply different amounts of current. Make sure your power supply is ATX, not just AT.
Once you have found a power supply, the next step is modifying it so it is suitable for bench power supply use. A computer PSU cannot work outside of a computer without simple modifications. There is a great wikiHow article about how to modify it here. The step where you bundle wires with the same voltage is important. If you don't, running 13 amps through a single wire will cause it to glow orange, incinerate the insulation, and eventually turn to molten copper. Trust me, burnt insulation does not smell good. (Not that this has ever happened to me, though! :-) ) In addition, I did not have to add a dummy load resistor, but some PSUs require it. Most cheapo power supplies do not require one. Also, Instead of using banana plugs, I decided to use ring terminals instead. Banana plugs would probably be a better choice if you can use them.
This is how I hook my generator up to the power supply. I basically solder the wires securely to a bolt and use a nut to fasten it on to the power supply ring terminal. Its important to get good solid contact between the terminals. If the current is being funneled through just a small area of contact, it might heat up or possibly weld itself together if the current is high enough. I make sure all exposed metal is covered by tape. Ideally these terminals would not be dangling around but so far I haven't bothered to fix this yet.
So far, my power supply has worked great, despite the constant abuse I put it through. If you have any questions about the process, feel free to ask in the comments.
Good luck!
A computer power supply is cheap, and powerful. Computer PSUs also provide the voltages I need, such as 5 and 12 volts. There are varying degrees of quality when it comes to power supplies. There are extremely regulated, stable, and expensive power supplies intended for sensitive computer components, and there are cheap power supplies that aren't so regulated and can pose a threat to the electronics they power. I would never put a cheapo PSU in my computer, but they are perfect for the brute force needs of electrolysis. I picked up a 450W ATX PSU on eBay for only $30 USD. 450W is plenty for my generator, but if you have a huge one, I would recommend getting a higher wattage or better yet just get a second one. You should find out the amperage your generator consumes to find out what power supply fits your needs. Be aware that the different rails (5V, 12V, 3.3V) all supply different amounts of current. Make sure your power supply is ATX, not just AT.
Once you have found a power supply, the next step is modifying it so it is suitable for bench power supply use. A computer PSU cannot work outside of a computer without simple modifications. There is a great wikiHow article about how to modify it here. The step where you bundle wires with the same voltage is important. If you don't, running 13 amps through a single wire will cause it to glow orange, incinerate the insulation, and eventually turn to molten copper. Trust me, burnt insulation does not smell good. (Not that this has ever happened to me, though! :-) ) In addition, I did not have to add a dummy load resistor, but some PSUs require it. Most cheapo power supplies do not require one. Also, Instead of using banana plugs, I decided to use ring terminals instead. Banana plugs would probably be a better choice if you can use them.
This is how I hook my generator up to the power supply. I basically solder the wires securely to a bolt and use a nut to fasten it on to the power supply ring terminal. Its important to get good solid contact between the terminals. If the current is being funneled through just a small area of contact, it might heat up or possibly weld itself together if the current is high enough. I make sure all exposed metal is covered by tape. Ideally these terminals would not be dangling around but so far I haven't bothered to fix this yet.
So far, my power supply has worked great, despite the constant abuse I put it through. If you have any questions about the process, feel free to ask in the comments.
Good luck!
phpMyAdmin complains about the 'controluser' after upgrade
11:26 AM Bytes, controluser, linked-tables, phpmyadmin 0 comments
When recently upgrading my server to Ubuntu 9.04, phpMyAdmin was also upgraded to version 5.0.75. When I loaded up the new version, I was alarmed to find a new error message that read:
It turned out this error was due to the fact that version 5 of phpMyAdmin adds support for a new feature known as a linked-tables infrastructure. This infrastructure allows for new features such as bookmarks, comments, SQL-history, PDF-generation, and field contents transformation. The problem was that this new feature is enabled by default, with generic credentials set up for the controluser. If you don't have your database set up for the infrastructure, you will see the error. I have no use for these new features, so I'd rather just not mess with them. If you do want to enable the advanced features, here is an informative post about doing so on Ubuntu. If you just want to disable the linked-tables infrastructure, which is often the easiest and least intrusive way, just follow these steps:
Connection for controluser as defined in your configuration failed.
It turned out this error was due to the fact that version 5 of phpMyAdmin adds support for a new feature known as a linked-tables infrastructure. This infrastructure allows for new features such as bookmarks, comments, SQL-history, PDF-generation, and field contents transformation. The problem was that this new feature is enabled by default, with generic credentials set up for the controluser. If you don't have your database set up for the infrastructure, you will see the error. I have no use for these new features, so I'd rather just not mess with them. If you do want to enable the advanced features, here is an informative post about doing so on Ubuntu. If you just want to disable the linked-tables infrastructure, which is often the easiest and least intrusive way, just follow these steps:
- Type
nano /etc/phpmyadmin/config.inc.php
in the Linux terminal. You can substitute nano for vi or your favorite text editor.
- Find the two blocks of text that read:
$cfg['Servers'][$i]['controluser'] = $dbuser; $cfg['Servers'][$i]['controlpass'] = $dbpass;
$cfg['Servers'][$i]['controluser']
is what matters. The block that is actually used by phpMyAdmin depends on your setup, but just for simplicity we will apply the change to both.
- Just comment out those four lines by adding a // in front of each one.
- Save, and the error should disappear next time you access phpMyAdmin. If you are still having trouble, feel free to post a comment.
In Code, Charles Petzold avoids the over simplifications of other books altogether. Petzold starts by explaining the use of Morse code to talk to friends using flashlights, and moves on to relays, logic gates, flip flops. With each chapter Petzold adds another layer to your knowledge. At the end of the book you will understand the inner workings of a computer from the simplest to most complex components. After reading this book, I have all the knowledge I'd need to build a simple computer from the ground up.
One of my favorite characteristics of Petzold's writing is his foolproof explanation and careful attention to detail. As examples, Petzold uses accurate and interesting real world scenarios. A particular favorite of mine was his description of how a barcode works, to help explain the binary system. Because Code explains things from the very lowest levels first and one step at a time, very little previous knowledge of computers is required. I've enjoyed reading this book so much - hopefully you will to! I highly recommend it to anyone wanting to know what really goes on inside the computer.
I might even start and post a project where I actually build a computer from scratch. For the time being, here is a very interesting link to a webpage describing such a project: http://www.homebrewcpu.com/
UPDATE: I published some Logisim implementations of the CPUs described in this book here.