Skip to content

Instantly share code, notes, and snippets.

@tanema
tanema / multiprocess_migration.sh
Last active March 4, 2022 09:23
migrate files from gridfs to aws s3
#! /bin/bash
###################### USAGE ######################################
usage() {
echo "
Usage: mongotos3 [-t n] mongo_host mongo_collection s3_bucket
-t : number of parallel processes to use
mongo_host : the host of the mongodb server
mongo_collection : the collection to collecthe gridfs data from
s3_bucket : the name of the bucket you want to cp the files to
"
@ceicke
ceicke / metrics.sh
Created August 10, 2012 09:57
Get some code line vs. test code metrics for each tag
#!/bin/bash
counter=0
for tag in `git for-each-ref --sort=taggerdate --format='%(refname:short)' refs/tags`
do
echo $tag
git checkout $tag
code_line_count=`grep -vR '^\s*$\|^\s*#.*$' ./app/**/* | wc -l`
test_line_count=`grep -vR '^\s*$\|^\s*#.*$' ./features/**/* | wc -l`