This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change mydb.mycollection to your target ns | |
var result = db.currentOp(); | |
result.inprog.filter(function(p){return p.ns === 'mydb.mycollection';}).map(function(p){return p.opid >= 0 ? p.opid : Math.pow(2,32) + p.opid;}).forEach(function(pid){ db.killOp(pid);}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Get your files that Gmail block. Warning message: | |
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled." | |
# Based on: https://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/ | |
# Instructions: | |
# Go to your emails, click the arrow button in the top right, "Show original", then "Download Original". | |
# Move the files to the same directory as this program, then run it. | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VINLookupForm(Form): | |
""" | |
Lookup a VIN form | |
""" | |
vin = TextField(u'Enter VIN', | |
validators=[validators.Required(u'VIN is required for lookup.')]) | |
def validate_vin(self, field): | |
""" | |
Validate a VIN against the 9th position checksum |