CloudFront CORS with Custom Origin

Modern browsers respect Cross Origin Resource Sharing which means they won’t load web fonts (.woff, .ttf, etc.) from a CloudFront distribution.

If you are using a custom origin (AKA your website) for CloudFront you need to do the following:

1. Send the header Access-Control-Allow-Origin: * when serving up web fonts on your server.

Example for Apache (in .htaccess):

 # Set CORS headers so CloudFront will forward them
 <FilesMatch ".(eot|ttf|otf|woff|svg)">
 Header set Access-Control-Allow-Origin "*"
 </FilesMatch>

2. Edit your CloudFront distribution Behavior to Forward Headers and add Origin to the whitelist. I know this doesn’t make a ton of sense but that’s how AWS set it up (source).

 

 

3. Invalidate your cache from the AWS console or just wait until CloudFront refreshes its cache.

Fix a malfunctioning BlackBerry Trackball [video]

A friend of mine had a couple Bolds with trackball issues, we went as far as taking one of them apart and attempting to clean the trackball mechanism with no luck. I finally came across this method on a forum and we were amazed by the results – so amazed that we recorded the process on the second Bold with an HD Flip.

Fix slow connections to Ubuntu SSH servers

As of Ubuntu 8.10 and older, connections to SSH servers with default configs can be annoyingly slow. Thisterminal is because the OpenSSH daemon uses DNS to run a reverse lookup on the client to be sure that they aren’t faking their hostname. You can disable most look-ups by implementing the following setting:

As root edit “/etc/ssh/sshd_config” and add the line “UseDNS no“.

This can also be done by running the following command:

[code]sudo echo “UseDNS no” >> /etc/ssh/sshd_config[/code]

Sources:

This issue is documented at OpenSSH.org

Fix and more details available at: http://tech.waltco.biz/2008/02/02/ssh-slow-to-connect-in-ubuntu-710-gutsy-gibbon/

Hide Administrator from Welcome Screen in Vista

By default the Administrator account in Vista is Disabled – everything is run in a sudo fashion withoutvista-icon actually logging in to the Administrator account. Some times due to external password recovery systems or other various reasons the built-in Administrator account is enabled, causing it to show up on the Welcome Screen.

In order to stop the Administrator account from showing as a login option on the Welcome Screen in Windows Vista you need to set the Administrator account to not active with the net user command from an Administrative cmd prompt as follows:

[sourcecode]net user Administrator /active:no[/sourcecode]

Some people report that the “/” causes the command to fail, try it without:

[sourcecode]net user Administrator active:no[/sourcecode]

From then on the the Administrator account should no longer show on the Welcome Screen.

SOURCE:

http://www.mydigitallife.info/2007/08/10/activate-enable-and-show-administrator-account-in-vista-welcome-screen/

Missing User Accounts in Windows XP

xp-logoSo this time they weren’t hidden ’cause they weren’t in the following registry key:

[sourcecode]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\SpecialAccounts\UserList[/sourcecode]

But they didn’t show up in the Accounts Control Panel or in Run > control userpasswords2.

But they do show up when you run the command:

[sourcecode]net user[/sourcecode]

aaand each account is active.. BUT they had no groups assigned to them and since it was XP Home Edition we didn’t have access to the groups snap in.

So, thanks to Google we found the proper syntax for adding a user (“username”) to a group (“Administrators”) with the net command:

[sourcecode]net localgroup Administrators username /add[/sourcecode]

Sources:

http://www.ss64.com/nt/net_useradmin.html

http://www.theeldergeek.com/create_hidden_user_account.htm

Disable Recent Documents in Gnome 2.22.3

So even Windows lets you disable the Recent Documents feature, but for some reason Gnome really wants to remember what files you’ve been messing with. Personally I never use this menu item (usually under Places in the Gnome Main Menu) and find it to be a bit of a privacy concern.

Surprisingly enough there are no documented settings for Recent Documents, not even something in gconf-editor, so people have been going stone age to prevent this functionality. In the past you could change permissions for the file that stores the data in your home directory, but it seems in later versions of Gnome the following is the current method of choice.

Continue reading “Disable Recent Documents in Gnome 2.22.3”