Skip to content

Instantly share code, notes, and snippets.

# installing memcache in ubuntu
1. create a user and give sudo access
$ sudo adduser newuser
$ sudo adduser newuser sudo
or
$ sudo visudo
@parmeshwor11
parmeshwor11 / google.chrome.txt
Last active January 11, 2016 22:50
chrome browser shorcuts
open new window : ctrl+N
open new window in incognito mode : ctrl+shift+N
open new tab : ctrl+t
reopen last tab you closed : ctrl+shift+t
open link in background tab : ctrl+ click link
opne link in foreground tab : ctrl+shift+ click link
go previous page in browsing history : backspace or alt + -->
@parmeshwor11
parmeshwor11 / php pdo install in ubuntu
Created November 5, 2015 02:55
php pdo error resolving
1. check if pdo support is installed
$php -i|grep PDO
output :
PDO
PDO support => enabled
PDO drivers => mysql
PDO Driver for MySQL => enabled
if installed ouptut is like above else
$sudo apt-get install php5-mysql;
@parmeshwor11
parmeshwor11 / abc
Last active January 31, 2016 00:28
interview puzzles
Permutation of numbers with repetition :
n - total elements , r - taken r at a time
nPr=nr
Permutation without repetition
nPr = n!/(n-r)!
combination of numbers
@parmeshwor11
parmeshwor11 / mongo fail to start
Created October 14, 2014 16:10
mongo filure to start
Error:
MongoDB shell version: 2.6.4
connecting to: test
2014-10-14T21:25:38.484+0545 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2014-10-14T21:25:38.487+0545 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed
Solution:
go to