for FILE in *.webm; do
echo -e "Processing file '\e[32m$FILE\e[0m'";
ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3";
done;
nJoy π
for FILE in *.webm; do
echo -e "Processing file '\e[32m$FILE\e[0m'";
ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3";
done;
nJoy π
This script requires genuine cp -al capable gnu and rsync commands together with a hardlink capable FS + OS.
#!/bin/bash
[ $# -ne 2 ] && echo "Incorrect usage : $0 <source path> <target path>" && exit 128 ;
SOURCEFOLDER=$1
TARGETFOLDER=$2
SF_LEN=${#SOURCEFOLDER}-1
TF_LEN=${#TARGETFOLDER}-1
#echo "Last character in source folder is ${SOURCEFOLDER:SF_LEN}"
if [ "${SOURCEFOLDER:SF_LEN}" != "/" ] ; then
echo "Adding trailing slash"
SOURCEFOLDER=$SOURCEFOLDER"/"
fi
#echo "Last character in target folder is ${TARGETFOLDER:TF_LEN}"
if [ "${TARGETFOLDER:TF_LEN}" != "/" ] ; then
echo "Adding trailing slash"
TARGETFOLDER=$TARGETFOLDER"/"
fi
echo $SOURCEFOLDER
echo $TARGETFOLDER
LOCKFILE=/tmp/`echo $0 $SOURCEFOLDER $TARGETFOLDER | sed "s/[^[:alnum:]]/_/g"`.lck
echo "Lockfile : $LOCKFILE"
[ ! -d $SOURCEFOLDER ] && echo "Source does not exist !! $SOURCEFOLDER exitting with error" && exit 1;
TIMESTAMP=$(date --utc +%Y%m%d%H%M )
#echo $TIMESTAMP
if [ ! -d $TARGETFOLDER ]; then
mkdir $TARGETFOLDER
rsync -av --delete $SOURCEFOLDER $TARGETFOLDER/$TIMESTAMP/
else
[ -d $TARGETFOLDER/$TIMESTAMP/ ] && echo "Folder already there !! Leaving.. " && exit 0;
LASTBACKUP=$(ls $TARGETFOLDER | sort -rn | head -1)
echo "Link copying $TARGETFOLDER/$LASTBACKUP to $TARGETFOLDER/$TIMESTAMP/"
cp -al $TARGETFOLDER/$LASTBACKUP $TARGETFOLDER/$TIMESTAMP/
rsync -av $SOURCEFOLDER $TARGETFOLDER/$TIMESTAMP/
fi
echo " OK !! Done"
SECONDS=0;sleep 5 & sleep 6 & sleep 3 & sleep 7 & wait ; elapsedseconds=$SECONDS ; echo $elapsedseconds
nJoy π
<html>
<head>
<title>
Redirecting...</title></head>
<script language="JavaScript">
function redirectHttpToHttps()
{
var httpURL= window.location.hostname + window.location.pathname + window.location.search;
var httpsURL= "https://" + httpURL;
window.location = httpsURL;
}
redirectHttpToHttps();
</script>
<body>
</body>
</html>
nJoy π
findmnt | grep "\["
nJoy π
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
logoff and log on
nvm ls-remote nvm install v7.9.0 npm -v node -v
Caveat : Β Lots of node stuff fails to compile and run on such an oldΒ version of linux be warned…
Thats it you now have node and npm installed. nJoy π
UUID=de9a1ccd-a2dd-44f1-8be8-0123456abcdef /data ext4 defaults,nofail 0
or
/dev/xvdf /data ext4 defaults,nofail 0
π nJoy
/**
* Created by davidsaliba on 13/03/2017.
*/
var MongoClient = require('mongodb').MongoClient
, format = require('util').format;
var url = 'mongodb://localhost:27017/test';
var async = require ('async');
var entry = {
data : "skdlfjsdf",
array : [ {id:"arr_obj1"} , {id:"arr_obj2"} ]
};
var entries = [];
var total_entries = 1000000
for (var j = 0 ; j <= total_entries ; j ++){
console.log (j);
entries.push({"_id":j ,entry:entry});
}
console.log ("Number of entries", entries.length);
MongoClient.connect(url, function(err, db) {
// Get the collection
var col = db.collection('articles');
//
var bulk = col.initializeOrderedBulkOp();
var counter = 0;
async.whilst(
// Iterator condition
function() { return counter < total_entries },
// Do this in the iterator
function(callback) {
counter++;
bulk.insert(entries[counter] );
if ( counter % 1000 == 0 ) {
bulk.execute(function(err,result) {
bulk = col.initializeOrderedBulkOp();
callback(err);
});
} else {
callback();
}
},
// When all is done
function(err) {
if ( counter % 1000 != 0 )
bulk.execute(function(err,result) {
console.log( "inserted some more" );
});
console.log( "I'm finished now" );
db.close();
}
);
});
nJoy π
You should edit your sources.list , by adding the following line:
deb http://ftp.ca.debian.org/debian/ jessie main contrib
Then upgrade your package and install git:
apt-get update && apt-get upgrade && apt-get dist-upgrade apt-get -f install apt-get install git nJoy ;-)