Skip to content

Instantly share code, notes, and snippets.

Michael Samoylov msamoylov

View GitHub Profile
View gist:4936604504534f90c8b0cac943e3b619
git fetch -p; for branch in `git branch -vv | grep ': gone]' | gawk '{print $1}'`; do git branch -d $branch; done
msamoylov / gist:07026636872c93331400
Last active Aug 29, 2015
Python screening questions
View gist:07026636872c93331400
def powers():
return [lambda x : x ** i for i in range(3)]
print [m(5) for m in powers()] # Produces [25, 25, 25]
# What would you change to get the expected [1, 5, 25] results?
def powers():
for i in range(3): yield lambda x : x ** i
print [m(5) for m in powers()]
View IPv6
Received: from ( [2600:3c00::f03c:91ff:fedf:57ab])
by with ESMTP id rz7si16669138pbc.162.2013.;
Tue, 22 Jan 2013 03:45:05 -0800 (PST)
Received-SPF: pass ( best guess record for domain of designates 2600:3c00::f03c:91ff:fedf:57ab as permitted sender) client-ip=2600:3c00::f03c:91ff:fedf:57ab;
Received: from ( [])
by (Postfix) with ESMTP id 3460326808;
Tue, 22 Jan 2013 06:45:05 -0500 (EST)
msamoylov / README
Created Oct 24, 2012 — forked from alex-klepa/README
MongoDB multiple instance upstart scripts: mongodb, mongod --configsvr and mongos
MongoDB upstart scripts for Ubuntu.
Run following commands after installing upstart scripts:
ln -s /lib/init/upstart-job /etc/init.d/mongoconf
ln -s /lib/init/upstart-job /etc/init.d/mongodb
ln -s /lib/init/upstart-job /etc/init.d/mongos
To start services use:
You can’t perform that action at this time.