Roll your own unblock-us

So you’ve got your VPS located in the US up and running but just don’t know how to put it to use? A nifty little tool named sniproxy will do great things for you.

Moving old files in Linux

Archiving might become a necessity when storing a lot of files on a server. This is a snippet which moves files older than a year to another directory. Note the -print0 and -0 (zero) which add null characters for escaping spaces and backslashes. find myfiles/ -mtime +365 -print0 |xargs -0 -I {} mv {} myfiles_old/

Salesforce and saving to server

Receiving the following error when Force.com IDE is started? com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor Try switching workspace - to the very same workspace! File -> Switch Workspace -> Other.. Select the same workspace, OK and voilá! Source

MVC 3 json post array workaround

Ajax-posting a JSON object containing arrays using jQuery work fine in PHP, but since ASP.NET expects the array to be posted with indeces a tiny workaround is required. Consider the following example: var jsonData = { foo: 0, bar: [1, 2] }; $.post("/post-url", postData, function () {}); This will cause the post data to look like foo=0 bar[]=1 bar[]=2 PHP acceps this, but ASP.NET requires the post data to be