Code, aimless meanderings and occasional outbursts from an Australian expatriate living in Singapore.
Monday, April 26, 2010
Mishca's Mothers En Vogue Photoshoot
She went really well considering she was such a shy little girl just a few months ago :)
Well done Mishca!
Sunday, April 25, 2010
Facebook Makes More Of Your Data Available Again
Facebook is once again making more of your data available without your permission.
I was very disappointed to see that I was suddenly opt-ed in to basically sharing everything about me, and allowing my friends to also share this information about me. I never gave my explicit permission to do this. I'm sure it is entirely covered by their Terms and Conditions.
At a minimum, Facebook should have asked users what their preference was, but chose not to do so. This is an extremely deceptive practice, somewhat similar to lying by omission.
Yes, I am aware I can change the settings. I also know most people won't because they don't care, are too lazy, or just do not understand how much they are "sharing".
I also love how giving away your personal information is called "sharing" now. How very, "double-speak" of Facebook. To be fair Facebook aren't the only social networks that shares you information to their partners.
As an individual that still has dreams of privacy I simply do not like where this is going. I was hesitant about joining Facebook to begin with because I could see the depth the data that would allow information seekers to build very detailed profiles on each of us. I even deactivated my Facebook account once before giving in and re-activating it.
So, I'll announce it to the world...
I will be deleting my account on or before 25 May 2010, using Facebook's Delete my Account page.
Deep down I am not at all surprised by the direction Facebook is going with this. My lack of surprise also reminds me that although I was quite sure it would get to this point it was a stupid decision ever choosing to believe it could would have been any different.
Bye bye Facebook. It has been... educational.
Links
Monday, January 18, 2010
Howto Install Ruby 1.8 and RubyGems from source on Debian
In the latest addition to the, "Howto Install stuff from Source on Debian", series, this post shows how to install Ruby 1.8 and RubyGems from source on Debian.
This installation has been tested out successfully on Debian Lenny, and Debian Etch. It should also work on Ubuntu.
Permissions
As noted in my last post, my user has write permissions to /usr/local/src so I don'thave to run everything under sudo. This was accomplished by allowing the staff group to write to /usr/local/src , giving write access to the staff group, and adding my user to the "staff" group.
If you would like to set this up...
# sudo chown root:staff /usr/local/src # sudo chmod 775 /usr/local/src # sudo usermod -a -G staff your_username
If you were not previously a member of the staff group you will need to logout and login again, or just open a new shell, for the changes to take effect.
Install
A browser friendly version of the script can be seen at http://gist.github.com/271029.
Once again, I've leveraged gist as a tool to store my installation scripts.
The script is just a wrapper to install the necessary Debian packages. This script then downloads a second script which actually downloads, configures, and install Ruby 1.8 and RubGems.
Not only is gist a very useful tool, but I've also found GitHub to be an excellent online git repository.
The scripts use the "Raw" versions of the gists.
To install, run these commands...
# wget http://gist.github.com/raw/271029/d16c8acf620047b88e509ccab205959681fd443d/install_ruby18_on_debian.sh # chmod a+x ./install_ruby18_on_debian.sh # ./install_ruby18_on_debian.sh
If all goes well, Ruby and RubyGems will have been installed.
# which ruby /usr/local/bin/ruby # ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux] # which gem /usr/local/bin/gem # gem -v 1.3.5
Enjoy Ruby!
Other Posts in this Series
Friday, January 15, 2010
Install Nginx from source on Debian
I thought it was time to write a followup post to, Install Memcached from source on Debian Lenny.
At this moment, Debian provides Nginx 0.6.39 and I was wanting to run Nginx 0.7. The latest stable version is 0.7.64, so I thought I would put together a script to automate the download and installation for me.
Some devoted Debian users will want to string me up for installing a source package, and some others will no doubt say that I'm hating Debian for not using aptitude. These people are entitled to their opinion of course, but I don't feel that there is anything wrong with installing a source package on Debian.
If you feel like installing a package from source makes Debian cry, leave now :)
Monday, December 14, 2009
Install Memcached from source on Debian Lenny
Debian is quite simply excellent, and I wouldn't even consider running any other distro in production anymore.
Occasionally though, there are packages that become a bit outdated, and a source install is needed.
For me, Memcached is one of those packages. The latest in the Debian Lenny Apt repositories is 1.2.2, but the latest stable build is actually 1.4.4. Good luck seeing that in the stable apt repositories anytime soon :)
So, to make life easy, I've put together a fairly simple bash script that downloads and installs Memcached, and libevent, for you.
The script is a blunt instrument, and assumes...
- You haven't installed memcached from apt repositories on this machine
- You won't be sad when it puts config and startup files at
- /etc/memcached.conf
- /etc/init.d/memcached
- /usr/share/memcached/scripts/start-memcached
Thursday, December 10, 2009
Fix POST for Ruby 1.9.1 and Passenger
How exciting! A new Ruby release to play with.
I figured it was time to migrate this particular app to 1.9.1 on the integration server. We've been developing this app with 1.9 and all looks good.
So I...
- Upgraded Nginx to version 0.7.64
- Installed Ruby 1.9.1-p376
- Installed Passenger 2.2.7
- Configured Nginx to use the new versions of Ruby and Passenger
- ... and restarted Nginx
I hit the home page of the app.... Sweet, it works! Yay!
At this point I did a minor happy dance. Nothing over the top, you know... just a little wiggle :)
Then I tried to login to the app... "500 Internal Server Error"
Oh. :(
I stopped dancing right there.
It turns out that POST requests fail for Ruby 1.9.1 and Passenger.
Fortunately, there is a patch.
Patching tempfile.rb did the trick. On that particular machine, tempfile.rb was located at /usr/local/lib/ruby19/1.9.1/tempfile.rb
Thanks to Ryan Bigg for confirming the fix is good.
Tuesday, November 24, 2009
Remember Which Goals are Important
When Boeing prepared to launch the design of the 727 passenger plain in the 1960s, its managers set a goal that was deliberately concrete: The 727 must seat 181 passengers, fly nonstop from Miami to New York City, and land on Runway 4-22 at La Guardia. (The 4-22 runway was chosen for its length--less than a mile, which was much to short for any of the existing passenger jets.) With a goal this concrete, Boeing effectively coordinated the actions of thousands of experts in various aspects of engineering or manufacturing. Imagine how much harder it would have been to build a 727 whose goal was to be "the best passenger plane in the world."
Tuesday, November 10, 2009
Factory.create(:factory_girl, :fixtures => false)
Friday, March 20, 2009
Australian Website Blacklist. Would you like lies with that?
So it seems the Australian government lied about how many URL's are on their blacklist.
Fair enough I suppose, we weren't meant to ever know what was on the list anyway.
Of course they lied. Whenever power is wielded in the absence of transparency do we ever hear about how it was secretly used for out benefit? No, we don't.
Senator Conroy says that this isn't the list. Now, because the list is supposed to be a secret there is nothing to weigh this statement against, so it must be taken on faith alone.
Ah, faith...
This is where we get to the other part of the problem. Senator Conroy represents a group of Australians that think it is OK to push their religious views onto others. We all know how great religious zealots are at being open and honest. They've scored a 0 out of 10 for that. These guys are as "open and honest" as they need to be to push their agenda, or to escape prosecution. Don't tell me you need examples.
What about my agenda? I don't have one. I'm also a nobody with no power. I just want information to be out on the open where it wants to be. If you or I want information, we should be able to find it. I do not want my Government telling me what information I should or should not see, as it has proven so often in the past to be way too tempting to Governments to use censorship to help keep themselves in power. Again, you don't need examples, I'm sure you can think of many instances of this being reported... eventually.
"But won't someone think of the children?!", some of you cry. Will someone think of the children years from now when they are denied access to information about about other political parties in Australia, or news about the latest bad things the Government has been doing to Australians.? OK, that may not happen, but once a blacklist exists it can happen. You don't need examples provided for this either.
I'm quite sure if the Labour Party had made it known they were planning on introducing web censorship the balance would not have tipped in their favor at the last election. I suppose thats why they want to get the blacklist implemented in the early part of their term. Voters have short memories generally.
Once we've all been conditioned to accept with censorship of the information we can see, your opinion as an individual is worthless. You lost the power to make your vote mean what you intended it to mean, because without all the information available to you, how can you make an informed decision?
As an Australian I'm incredibly disappointed about this whole mess, although the cynic inside me is not at all surprised.
Sunday, March 8, 2009
scottbarr-number_to_text RubyGem
n = Number.new(119) puts n.to_text # => "one-hundred-and-nineteen"I'm not happy with how the implementation came, but it does the job. I'll clean it up to work a bit nicer sometime :) If you need to convert numbers to text in Ruby, take a look at http://github.com/scottbarr/number_to_text/tree/master