Skip to content

Instantly share code, notes, and snippets.


  • Zürich, Switzerland
Block or report user

Report or block AlexRRR

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:b15d86e88811f21dbf2214624f2006c5
### Keybase proof
I hereby claim:
* I am alexrrr on github.
* I am ardoodle ( on keybase.
* I have a public key ASBjTXT7ru8KIzuW-MTtGi6Ejhnh_5spaj6H9Tx9ldfvIQo
To claim this, I am signing this object:
View Calculator.markdown
AlexRRR / gist:7f5de57ea65adcb1cb5c
Last active Aug 29, 2015
MongoDB: Find which DB contains a collection
View gist:7f5de57ea65adcb1cb5c
var findCollection = function(colName) {
var db_list = db.adminCommand('listDatabases')
var allDbs = { return (x['name']) }) {
db = db.getMongo().getDB(x);
var cols = db.getCollectionNames();
if (cols.indexOf(colName) > 0) {
AlexRRR /
Created Jan 29, 2014
handy script for linting and parsing your currently modified files.
git status|grep modified|awk '{$1=$1}{ print }'|cut -d' ' -f2|while read -r line; do
echo "Linting and parsing $line ..."
puppet-lint --with-filename --no-80chars-check $line
puppet parser validate $line
AlexRRR /
Created Oct 19, 2012 — forked from pamelafox/
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
You can’t perform that action at this time.