-- Check index usage statistics --
SELECT
schemaname,
relname AS table_name,
indexrelname AS index_name,
idx_scan AS number_of_scans,
idx_tup_read AS tuples_read,
idx_tup_fetch AS tuples_fetched
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create an object to store all index information | |
var clusterIndexes = {}; | |
db.getMongo().getDBs().databases.forEach(function(database) { | |
if (database.name !== 'admin' && database.name !== 'local' && database.name !== 'config') { | |
clusterIndexes[database.name] = {}; | |
var dbs = db.getSiblingDB(database.name); | |
dbs.getCollectionNames().forEach(function(collName) { | |
clusterIndexes[database.name][collName] = db.getCollection(collName).getIndexes(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Database,Collection,Index Name,Is Unique,Is Sparse,TTL (seconds),Fields"); | |
db.getMongo().getDBs().databases.forEach(function(database) { | |
// print("\nDatabase:", database.name); | |
if (database.name !== 'admin' && database.name !== 'local' && database.name !== 'config') { | |
var dbs = db.getSiblingDB(database.name); | |
dbs.getCollectionNames().forEach(function(collName) { | |
// print("\collName:", collName); |
- Status:
sudo systemctl status cron
- Restart:
sudo /etc/init.d/cron restart
- Stop:
sudo /etc/init.d/cron stop
- Edit CronJobs:
sudo vi /etc/crontab
- Top 10 process:
ps aux --sort=-%cpu | head -n 10
- One-time snapshot of CPU usage:
ps aux | sort -nrk 3,3 | head -n 5
- Live status of a process:
top -p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"backgrounds":[{"active":true,"display":{"blur":0,"luminosity":-0.6},"id":"8b0af48b-41e8-454a-95bd-49e4d0d564be","key":"background/unsplash"}],"widgets":[{"active":true,"display":{"fontSize":40,"position":"middleCentre"},"id":"8ea891f7-5c83-4ea5-b072-b18eb6e3af7f","key":"widget/search"},{"active":true,"display":{"fontSize":14,"position":"topCentre"},"id":"3c61f87c-6166-4f74-9167-7302989b4f5f","key":"widget/time"},{"active":true,"display":{"position":"topCentre"},"id":"3390cd5f-5683-4a50-8433-38de44414bdb","key":"widget/weather"},{"active":true,"display":{"fontSize":10,"position":"bottomCentre"},"id":"222c9632-971d-40d3-a34b-e48c1ed85764","key":"widget/quote"},{"active":true,"display":{"fontSize":12,"position":"middleCentre"},"id":"9a590210-089d-4520-b3ea-5f6d54663e48","key":"widget/links"}],"data":{"222c9632-971d-40d3-a34b-e48c1ed85764":{"category":"developerexcuses"},"3390cd5f-5683-4a50-8433-38de44414bdb":{"latitude":-33.8548157,"longitude":151.2164539,"showDetails":false,"units":"auto"},"3c61f87c-6166-4f74 |
First way: My personal peference:
pyenv
to manage my python version.
pyenv install 3.7.3
pyenv local 3.7.3
Check your python version:
2019-06-03
Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
You need to install poppler for pdftotext (for macOS) | |
> brew install pkg-config poppler | |
@JOSHI, Sarthak | |
PyPi: https://pypi.org/project/pdftotext/ | |
""" | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
You need to install poppler for pdftotext (for macOS) | |
> brew install pkg-config poppler | |
@JOSHI, Sarthak | |
PyPi: https://pypi.org/project/pdftotext/ | |
""" | |
import os |
NewerOlder