Month: November 2013

Browser Offline
Posted in How To Web

How to make browser offline cache retrieve new version of the page when browser is online, but keep using cache when it is offline

Offline cache is awesome! For certain things. For most regular web pages it is unfortunately not. Here is web developer’s most frequent use for the offline cache: make browser use cached version of the page when browser is offline but refresh it when it gets online. What could be simpler…

READ MORE
Posted in How To Linux Web

AWS EC2 ssh not responding in RHEL 6.4 AMI

I was fighting with an AWS bug today seeming just ridiculous for a system that makes ssh the only way to access the server. With no console login EC2 users are completely dependent on flawless sshd operation and Amazon team just did a really bad job preparing the RHEL 6.4…

READ MORE
Photo by Micah Boswell on Unsplash
Posted in How To Tools

How to use large / multiline text as a field in mongodb

I’m working on a project that requires storing large multiline chunks of text in MongoDB. The chunks should be inserted in the database during initial database population, so I need to enter them somewhere in db population script. Unfortunately you can’t just put something like this:

db.tests.insert( {
name: ‘test’,
text: ‘this is
my…

READ MORE