Skip to content

Instantly share code, notes, and snippets.

@cjaoude
cjaoude / gist:fd9910626629b53c4d25
Last active January 13, 2026 22:58
Test list of Valid and Invalid Email addresses
Use: for testing against email regex
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses
List of Valid Email Addresses
email@example.com
firstname.lastname@example.com
email@subdomain.example.com
firstname+lastname@example.com
@piscis
piscis / gist:3b3df53241fdbb859c07
Last active January 4, 2026 18:47
MongoDB: Drop all indexes on all collections in one database
db.getCollectionNames().forEach( function (d) {
db[d].dropIndexes();
});
db.tilezoom_source.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );
db.tilezoom_artefacts.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );
db.mosaic_artefact.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );
db.mosaic_artefact_index.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );