Skip to content

Instantly share code, notes, and snippets.

Michael Samoylov msamoylov

Block or report user

Report or block msamoylov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4936604504534f90c8b0cac943e3b619
#!/bin/bash
git fetch -p; for branch in `git branch -vv | grep ': gone]' | gawk '{print $1}'`; do git branch -d $branch; done
@msamoylov
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 mail2.linode.com (mail2.linode.com. [2600:3c00::f03c:91ff:fedf:57ab])
by mx.google.com with ESMTP id rz7si16669138pbc.162.2013.01.22.03.45.05;
Tue, 22 Jan 2013 03:45:05 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of noreply@linode.com designates 2600:3c00::f03c:91ff:fedf:57ab as permitted sender) client-ip=2600:3c00::f03c:91ff:fedf:57ab;
Received: from www1.linode.com (webserver1.linode.com [69.164.199.240])
by mail2.linode.com (Postfix) with ESMTP id 3460326808;
Tue, 22 Jan 2013 06:45:05 -0500 (EST)
@msamoylov
msamoylov / README
Created Oct 24, 2012 — forked from alex-klepa/README
MongoDB multiple instance upstart scripts: mongodb, mongod --configsvr and mongos
View README
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.