Archive

Archive for July, 2010

Microsize me

July 30th, 2010 No comments

The world is getting smaller.

  • AT&T's got a Femtocell called a "MicroCell"
  • PayPal is an example of a "micropayment" service
  • Microformats are becoming increasingly popular to add more metadata into websites, mainly for richer machine processing
  • MicroATX is one of many small form factors. However, not as small as Nano-ITX, Mini-ITX
  • Twitter is the world's most popular "Microblogging" service
  • Need to clean something fragile? Microfiber cloths are typically used to clean luxury cars, computer parts, screens, etc.
  • Those small tweaks to squeeze out a little bit more performance? Micro-optimizations can be useful or can be a pain. It's up to you to decide what is worth it or not.

In this world of larger cars, larger boats, larger cruise ships, larger meals, just remember this - a lot of things are getting smaller. Typically technology... but I threw in another couple terms I seem to say often.

Update:

I forgot, microexpressions, now being made a household name thanks to the TV show "Lie to Me" (highly recommended show, btw.)

Categories: Uncategorized

Little-known URI shorthand - the "network-path" reference

July 21st, 2010 No comments

I've seen this before, and it was mentioned earlier today at OSCON, but I never knew if it was a browser behavior or a standard. Looks like I got it with some help from IRC.

Say you have a foreign host and you don't want to have to figure out if you're on http:// or https:// and call their assets appropriately so you don't get a mixed-mode warning. You can actually use a syntax that is defined in RFC 3986, specifically section 4.2:

A relative reference that begins with two slash characters is termed a network-path reference; such references are rarely used. A relative reference that begins with a single slash character is termed an absolute-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference.

Which means you can do this:

<img src="//foo.com/bar.jpg" />

and your browser will request http://foo.com/bar.jpg or https://foo.com/bar.jpg, depending on what scheme your browser is currently on.

I was hesitant at first to consider it "okay" but as it is published in the RFC and Chromium's fixed bugs relating to it, it does appear to be a properly supported method that could save you a few keystrokes. Let me know if it doesn't work for you! Be sure to give browser/OS information and conditions to reproduce.

Oh yeah, and the other host needs to be on https as well, of course. I shouldn't really have to say that, though 🙂

Categories: Development

nginx and Go Daddy SSL certificates

July 15th, 2010 1 comment
  1. Generate the CSR:
    openssl genrsa 2048 > yourhost.com.key
    openssl req -new -key yourhost.com.key > yourhost.com.csr
    
  2. Enter in whatever you want - you NEED the "Common Name" everything else is not really required for it to work.
    Country Name (2 letter code) [AU]:US
    State or Province Name (full name) [Some-State]:.
    Locality Name (eg, city) []:.
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:Something Here
    Organizational Unit Name (eg, section) []:.
    Common Name (eg, YOUR name) []:yourhost.com
    Email Address []:.
    
    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    
  3. Paste the CSR into Go Daddy, get back the .crt file
  4. Combine the cert + Go Daddy chain:
    cat yourhost.com.crt gd_bundle.crt > yourhost.com.pem
  5. Lastly, in nginx.conf:
    ssl_certificate /etc/nginx/certs/yourhost.com.pem;
    ssl_certificate_key /etc/nginx/certs/yourhost.com.key;
    

Additionally I have these SSL tweaks which seems to maintain a better SSL experience, passes McAfee Secure's SSL checks, etc.:

ssl on;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:-ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP;
ssl_session_cache shared:SSL:10m;
Categories: nginx

A simple Upstart recipe for KVM

July 1st, 2010 No comments

Might not be the most advanced, but hey, it works. You just need to alter the mac address and the display for each machine. I'm running this on Ubuntu 10.04 (Lucid) and it seems to work great.

/etc/init/my-kvm.conf:

description     "my-kvm"

start on (net-device-up
   and local-filesystems)
stop on runlevel [016]

respawn
exec /usr/bin/kvm -hda /root/virtual-machines/my-kvm.bin -no-acpi -m 128 -net nic,macaddr=DE:AD:BE:EF:18:12 -net tap -vnc :0

Enjoy.

Categories: Software