Skip to content

Cookie-free JS, CSS, etc for Wordpress

15-Jan-10

These 3 steps will help you to set up cookie free JavaScript, CSS and other files for your WordPress installation. (This is especially helpful for changing the domain of certain JS/CSS file references added by plugins.)

Before you start, make sure your blog URL has a leading www (e.g. www.example.com, not example.com). (Cookie-tech-stuff)

Step 1) Create a sub-domain pointing to your real web root (e.g. static.example.com).

Step 2a) Install CDN Rewrites plugin. (Did not work for me, so I had to revert to another way). If this is you as well, enter step 2b.1.

Step 2b.1) Install Free CDN plugin. Change its settings if you want to.

Step 2b.2) Edit /wp-content/plugins/free-cdn/free-cdn.php.

Find

if (isset($parts['port']))
{
$parts['host'] .= '.$parts[port].nyud.net';
unset($parts['port']);
}
else
{
$parts['host'] .= '.nyud.net';
}

around line 282. Right after this add:

$parts['host'] = 'static.example.com'; // my own edit

and make sure the domain matches the one you set up in step 1.

If you want to keep your edit safe, change the version number of the plugin to something like "1200" (at the beginning of the file) so that WP won't suggest updating the plugin.

[UPDATE: Remember to set WP cookie domain in wp-config.php: define('COOKIE_DOMAIN', 'www.yoursite.com');]

Cell Reference to Excel Header / Footer [Only VBA will do]

12-Jan-10

The only way: use a VBA macro. E.g.

ActiveSheet.PageSetup.LeftFooter = "Check: " &  Sheets(SETTINGS_SHEET_NAME).Range("F4").Value

Line Break in Excel Header / Footer via Macro

11-Jan-10

Using VBA, add line break to header or footer with Chr(13).

E.g.

ActiveSheet.PageSetup.LeftFooter = "Foo bar" & Chr(13) & "Another line"

WP Minify

08-Jan-10

Note to self. When building WP sites with several js/css files, remember to include WP Minify with the regular plugins.

Online Backup for Mac (Mozy, Carbonite, iDrive, Dropbox, ...)

29-Dec-09

Trying to find out a way to backup my data online. Lots of options.

Most of the "unlimited" backup plans have a caveat:

  • Mozy -- Free account of 2 GB. Deletes permanently deleted files after 30 days.
  • Carbonite -- Deletes permanently deleted files after 30 days.
  • Backblaze -- Deletes permanently deleted files after 4 weeks.
  • CrashPlan --No limitations as above, yet it's cheaper. Hmm..
  • LiveDrive -- Site looks fishy.
  • ElephantDrive -- Fishy.

Some talk about Mozy, includes great stuff about EULA's of Mozy and other players at the end.

Call me crazy but I'm going for a limited plan. Need around 200 GB storage.

Backup solutions:

  • JungleDisk -- Using Amazon S3: $0.150 per GB per month. Add transfer costs, etc. I really don't feel like counting the total cost..
  • iDrive -- Free account of 2 GB. 150 GB plan $4.95 / month. 500 GB $14.95 / month.
  • SafeCopy -- Free trial account of 3 GB. Can store multiple computers (and user accounts, I guess) to one SafeCopy account. 150 GB $50 / year. 250 GB $75 / year.

Backup and syncing solutions. Sync files across multiple devices (mac, pc, mobile phone, etc) :

  • Dropbox -- Free account of 2 GB. 100 GB $19.99 / month.
  • ZumoDrive -- Free account of 1 GB + 1 GB. 100 GB $19.99 / month. 200 GB $34.99 / month.
  • SugarSync -- Free account of 2 GB. 100 GB $14.99 / month. 250 GB $24.99 / month.
  • SpiderOak -- Free account of 2 GB. $10 / 100 GB / month or $100 / 100 GB / year.

Totally on its own category (someone said it supports mac, but I doubt it and really can't seem to find proper info -- or pretty much anything -- on the site):

  • SkyDrive (Windows Live) -- Free account of 25 GB.

Other options: Box.netSOS Online Backup. It's just that these has only plans for a few GB's.

    I guess I have to take a closer look which files I need to sync (I can't live without Dropbox anymore) and which need backup only. Seems like a SafeCopy + Dropbox hybrid solution will do.