SECONDS=0;sleep 5 & sleep 6 & sleep 3 & sleep 7 & wait ; elapsedseconds=$SECONDS ; echo $elapsedseconds
nJoy ๐
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 ;-)
setup service listener on viewer machine :
while : ; do ffplay -i tcp://192.168.xx.xx:1234?listen ; done
send video to it :
ffmpeg -re -i /dev/video1 -vcodec mpeg2video -f alsa -i hw:2,0 -ac 2 -s 1920×1080 -r 25 -strict -2 -f mpegts tcp://192.168.xx.xx:1234
where
192.168.xx.xx is the IP of the viewer where the ffplay is running.
1234 is the port used.
nJoy ๐
ffmpeg -re -i video.mp4 -vcodec libx264 -vb 1500000 -g 60 -vprofile main -f flv rtmp://ingest.cix.domain.com:1935/live/231232
nJoy ๐
Mount the ISO:
sudo mount -t udf -o loop,ro,unhide /path/to/file.iso /mnt
Insert the USB drive.
Run fdisk and specify the device name of the USB drive; for example:
sudo fdisk /dev/sdc
Delete any existing partition table and create a new one.
Create a new partition of at least 4.5 GB. Mark it bootable and set its type to 7 (HPFS/NTFS/ExFAT).
Write changes and exit fdisk.
Create a FAT-32 file system in the new partition; for example:
sudo mkfs.vfat -F 32 /dev/sdc1
Mount this partition to an existing subdirectory; for example:
sudo mount /dev/sdc1 /media/usbstick
Copy all of the files from the mounted ISO into this directory:
sudo cp -rv /mnt/* /media/usbstick
Sync the file systems just to be sure:
sudo sync
Unmount both items previously mounted:
sudo umount /media/usbstick
sudo umount /mnt
nJoy ๐