Skip to content

Instantly share code, notes, and snippets.

@rahulroshan96
rahulroshan96 / bobp-python.md
Created May 26, 2017 06:42 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@baybatu
baybatu / maven-war-exclude-directory.md
Last active June 30, 2020 20:31
Excluding Directory From War Package In maven-war-plugin

packagingExcludes configuration tag can be used to exclude certain files or directories from the war file. It is important to put '/' character at the end of the directory to be excluded. If there is no such '/' character, then the entry is interpreted as a regular file.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.3</version>
 
@matteofigus
matteofigus / mongo-ls.js
Created February 6, 2014 12:29
A script to list all the collections and document count for a specific mongodb db
// Usage: mongo {Server without mongodb:// example 127.0.0.1:27017}/{DbName} [-u {Username}] [-p {Password}] < ./mongo-ls.js
var collections = db.getCollectionNames();
print('Collections inside the db:');
for(var i = 0; i < collections.length; i++){
var name = collections[i];
if(name.substr(0, 6) != 'system')
print(name + ' - ' + db[name].count() + ' records');