Skip to content

Instantly share code, notes, and snippets.

AlexRRR

  • 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 (https://keybase.io/ardoodle) on keybase.
* I have a public key ASBjTXT7ru8KIzuW-MTtGi6Ejhnh_5spaj6H9Tx9ldfvIQo
To claim this, I am signing this object:
View Calculator.markdown
View frontendDevlopmentBookmarks.md
@AlexRRR
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 = db_list.databases.map(function(x) { return (x['name']) })
allDbs.map(function(x) {
db = db.getMongo().getDB(x);
var cols = db.getCollectionNames();
if (cols.indexOf(colName) > 0) {
print(x);
}
});
@AlexRRR
AlexRRR / gs.sh
Created Jan 29, 2014
handy script for linting and parsing your currently modified files.
View gs.sh
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
done
@AlexRRR
AlexRRR / countryinfo.py
Created Oct 19, 2012 — forked from pamelafox/countryinfo.py
Python list of country codes, names, continents, capitals, and pytz timezones
View countryinfo.py
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.