Just recently, I was implementing a protocol at work. The protocol was handed to me in the form of a Word document and it appeared to have already cleared some approval stages. The protocol seemed over-engineered to me. It used HTTP POST with XML in the request and response bodies. There was actually only one message type and it seemed like it could have easily been implemented with a simple GET request and no response body (just an HTTP response with a proper response code). The document was 24 pages long when it only required 1.
Just ported this site from Drupal 6 to Drupal 7 (finally) and making a new theme from scratch. Some things are probably broken and I'll get to them eventually (updated 2014-09-01).
For long time I've been wondering why I can't seem to burn DVDs or Blu-Rays properly using k3b in Linux (or any other graphical burning software for that matter). The problem is cdrkit (a fork of the original cdrtools).
You can get the latest version of cdrtools, which actually supports burning to Blu-Ray and also should create DVDs properly, by installing cdrecord from this PPA. You might as well also install mkisofs from there too.
I have a simple video website for my kids and each kid has a separate login. This is so they can each have their own videos, but also so that some videos can be private (ie. hidden from the outside world, or other logged in users). Typing in a username and password is impossible for my kids to do, as they are almost 5 and 2 years old, and they use this website on Google TV. So, with a magic token-style login, all they need to do is navigate to their bookmark on the Google TV homepage and press OK on the remote control.
I recently renamed a folder in my copy.com folder and caused Copy.com to think that I had deleted it. For example, I had the a folder called "Photos 2013." I installed the copy.com agent on a new computer and it began syncing. Midway through the sync, I wanted to change the folder's name to "Photos 2013-2014". This was interpreted as "Delete 'Photos 2013' folder and all sersver-side contents" and create a new folder called Photos 2014 with the photos in it. So let's say there were 100 photos, and 10 were were synced when I did it.
To wipe a hard drive using zeros:
dd if=/dev/zero | pv -s 250000000000 | dd of=/dev/sdX bs=10M
To wipe a hard drive with random data (more secure):
dd if=/dev/urandom | pv -s 250000000000 | dd of=/dev/sdX bs=10M
For the "pv" progress bar, do "apt-get install pv" or similar. I highly recommend using "pv" so you have some idea of when the dd job is going to finish.
I just set up a site using Django-CMS over at Pomme d'Api Preschool. Overall, I am pretty impressed. I really like the Django admin interface enhancements as well as the site overlay editing feature. One of the best things it he use of django-filer, a file management tool to manage all the uploads to the site. It's awesome and it makes me want to throw out this home page completely and switch over to Django-CMS. Image handling in Drupal has always sucked and still does.
If you ever get something like this:
Running /usr/bin/svn add -N --targets /tmp/svn_load_dirs_ErUQhjXmWG/targets.00001 /usr/bin/svn_load_dirs: /usr/bin/svn add -N --targets /tmp/svn_load_dirs_ErUQhjXmWG/targets.00001 failed with this output: svn: warning: W150002: '/tmp/svn_load_dirs_ErUQhjXmWG/my_import_wc/scripts/drupal.sh' is already under version control svn: warning: W150002: '/tmp/svn_load_dirs_ErUQhjXmWG/my_import_wc/scripts/run-tests.sh' is already under version control
I was working on a personal website for my kids where I can post videos for them and I noticed that for each video link that was displayed on the page there were 2 additional SQL queries. One to get the username of the user that added the video link, and another to get the list of categories for the link.
The model looks like this:
class Link(models.Model): ... # There was an extra query per link to get the categories for a link category = models.ManyToManyField(Category)
I've been maintaining and old Joomla 1.5-based website for my daughter's preschool, Pomme d'Api. It got hacked, I'm not sure how, via FTP or PHP but they basically managed to get 2 .php files on the server that were causing search engine crawlers to get a different version of the site that contained all sorts of links to various pages. It also changed the meta-information such as keywords and description.
I hate hashtags. At least they way that people use them. People seem to like using them to say things they wouldn't normally say in plain English. For example:
Why won't my kid take a nap? #damnkid #brat #nomorekids
This doesn't translate exactly into the following:
My damned kid won't nap
My kid is a brat
I don't want any more kids
This is intended as a dumping ground for all the tips on using exceptions that I accumulate over the years.
Don't swallow exceptions
Never, ever do this:
I recently forked the defunct eyefiserver project. The new project is called eyefiserver2. It is a server for eye-fi cards that runs on Linux using Python, however, it should be possible to run it on any OS, I just haven't tested it on anything other than Linux.
I'm tired of all this social networking bullshit. I mean the social networking bullshit that is always asking me to click something, creating visual noise, and generally just pissing me off because I'm not interested in sharing everything I do with the world. Today I purchased some books at Chapters and after my purchase went through I got this screen asking me if I want to "tell my friends about my purchase" on Facebook, LinkedIn, or Twitter.
[img_assist|nid=403|title=Chapters - Share Your Purchase|desc=|link=none|align=left|width=501|height=233]
I just tried Windows 8, and to be honest it's pretty awful. It looks like it's meant for running on a touch screen but if you are a desktop user it's horribly awkward to use. I'm not sure if it's a bug but getting the task bar thingy (what's it called?) to show up on the left-hand side of the screen is very difficult. I seem to have to hover on the top-left corner and wait for an icon to appear, then move downward, then the whole task bar thingy will appear.
So I have a django database I'm working on and I decided I wanted to do the development in sqlite3 instead of mysql. I decided to do this because it makes it easier, for example, to have someone else work on HTML/CSS if I can just give them a directory, tell them to run a bash script and go to http://localhost:8000, rather than them having to do all that AND setup a mysql server. Sure, that can also be done with a script, but with sqlite things are just a hell of a lot easier in some ways.