Sunday, February 22, 2015

How to insert a line into a file in NodeJS

How to insert a text in to a specific line in a text file using NodeJS.

function insertLine(file, lineNumber, insertText) {   
  var array = fs.readFileSync(file).toString().split("\n");
array.splice((lineNumber - 1), 0, insertText); fs.writeFileSync(file, array.join('\n'), 'utf8');
}

Friday, February 13, 2015

Fonts are distorted/blur after Windows Update in Vista 32/64 bit

After yesterday Windows Update (KB3013455) Courier New front got distorted very bad in my PC. It got bad to the level that it is not longer readable. This font change affected everywhere. Chrome, Notepad ++ ect and i was super mad for half of the day looking for a solution.  


to fix this problem you must uninstall KB3013455  from Windows Updates and reboot the device