Yearly Archives: 2014
Permissions 0755 for ‘certificate.pem’ are too open
You may experience bad permission error and ignoring operation while running a command with AWS. It’s because a AWS are concern about your security and make sure the certificate are only accessible by you, not even to read them or discover their names. That’s basic sensible security and it means no permissions whatsoever for group…
Issues with thinking sphinx
I recently faced some issues with thinking sphinx which sharing here so that it helps others. Has many association not working: I had a model named User which has many tracks and the very basic index definition is as follows: ThinkingSphinx::Index.define :track, :with => :active_record do indexes title indexes [artist.first_name, artist.last_name], :as => :artist_name, :sortable…
Securing secret token by generating new token dynamically
Many of us already know the reason to omit pushing secret token into version repository to secure the application. Attacker can take the secret token and re-generate valid cookies for your applications or check out what other users have inside their account. The solution is to: Generate manual key Not push the token into version…
Using multiple AWS Accounts from command line
A common mistake like launching and creating an app to different account can be happen when anyone managing multiple AWS account at a time. You can easily manage that by configuring command line interface to interact with AWS such as your security credentials and the default region, profile name. To overcome the difficulty, Create a…
Dirty checking to warn for unsaved changes using jQuery
Copy following code snippet into the application. dirtyCount() method return the number of fields have unsaved changes. var dirtyChecking = function () { $(‘input, select, textarea’).each(function () { var ele = $(this); ele.attr(‘data-old’, ele.val()); // Look for changes in the value ele.on(“change keyup paste click”, function (event) { if (ele.attr(‘data-old’) != ele.val()) { ele.addClass(‘unsaved’); }…