Posts

Showing posts from September, 2020

List all fields in MongoDB collection

var task = db.collection_name.find().next(); for (let key in task){print(key)};

Mount windows share on ubuntu

Install the CIFS Utils pkg sudo apt-get install cifs-utils Create a mount point sudo mkdir /mnt/local_share Mount the volume sudo mount -t cifs -o user=<user on Windows> //<windows_ip_address>/<share_folder> /mnt/<local_share> You will be prompted for password   To mount at boot, add to /etc/fstab file: //<windows_ip_address>/<share_folder>cifs user=<user on Windows>,pass=<user passwd> 0 0  

Font too small in KDE Timer Widget

sudo nano /usr/share/plasma/plasmoids/org.kde.plasma.timer/contents/ui/TimerView.qml change readonly property int digitH: ((height / 2) * digits < width ? height : ((width - (digits - 1)) / digits) * 2); to readonly property int digitH: 14  14 is the font size, change to any size you want.   To add more timing: sudo nano /usr/share/plasma/plasmoids/org.kde.plasma.timer/contents/config/main.xml At line <default>30,60,120,300,450,600,900,1200,1500,1800,2700,3600</default> add any value in seconds  To use dark theme, create folder /usr/share/plasma/desktoptheme/YOUR_THEME/widgets copy file /usr/share/plasma/desktoptheme/oxygen/widgets/timer.svgz

Run MongoDB query form terminal

 mongo localhost:27017/db_name script_name.js > result