Mado Tech Tips
[Mac] [Linux] [Windows]
This page is about me and my computer stuff. I hope that you guys can benefits from this page.
28/05/2020
Filtering in Linux top command
sudo top -c -p $(pgrep -d',' -f plex)
dd: TEST Disk WRITE Speed
Run the following command to test the WRITE speed of a disk:
Example:
$ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 3.28696 s, 327 MB/s
dd: TEST Read/Write Speed of an External Drive
Example:
$ sync; dd if=/dev/zero of=/media/user/MyUSB/tempfile bs=1M count=1024; sync
Elementary OS
vs code suddenly become the default file manager eg when clicking "open in folder" in chrome.
Check
xdg-mime query default inode/directory
Change
xdg-mime default io.elementary.files.desktop inode/directory
21/01/2020
Enable double click instead of single click in Elementary OS Files
Open dconf-editor
under io.elementary.files.preferences
change as per screenshot
Install and use system76-power in elementary os
Add Repo :
sudo apt-add-repository -y ppa:system76-dev/stable
*if command not found do a "sudo apt-get install software-properties-common"
sudo apt update
Install :
sudo apt install system76-power
Change card :
sudo system76-power graphics nvidia
OR
sudo system76-power graphics intel
*and check which one you're using with command
system76-power graphics
set a power profile:
sudo system76-power profile battery
battery - CPU: 25% - 50%,
balanced (default) - CPU: 25% - 100% or
performance - CPU: 50% - 100%
Create a Bootable USB Stick from the Ubuntu Terminal
1. Unmount the USB if it is mounted
Use df command to check USB that is mounted
Use sudo umount /path/where/mounted to unmount USB
2. create bootable USB
sudo dd bs=4M if=/path/to/ISOfile of=/dev/sdx status=progress oflag=sync
27/12/2019
Linux : How to scale text in elementaryos at 125%
Source :
Can I scale everything at 125%? I installed elementary OS on my laptop(14-inch,1080p). and the icon and text are just too small, smaller than Win10. Textsize in the settings only effects on the preinstalled applications. I've...
21/12/2019
Python : Converting ipynb and py files
Install
conda install -c defaults -c conda-forge ipynb-py-convert
Example
ipynb-py-convert examples/plot.py examples/plot.ipynb
or
ipynb-py-convert examples/plot.ipynb examples/plot.py
Source :
ipynb-py-convert Convert .py files runnable in VSCode/Python or Atom/Hydrogen to jupyter .ipynb notebooks and vice versa
Github
Steps to clear out the history of a git/github repository
https://gist.github.com/stephenhardy/5470814
Adding an existing project to GitHub using the command line
https://help.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line
Your first time with git and github
https://kbroman.org/github_tutorial/pages/first_time.html
Github Guides : Hello World
https://guides.github.com/activities/hello-world/
Installing Chrome Browser in Pixel Slate Crostini
1. Open Terminal (Crostini)
2. Download Chrome for debian. Can use wget or directly from browser in Chrome OS. Link : https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
3. sudo apt --fix-broken install ./google-chrome-stable_current_amd64.deb
Actually I just knew about using apt to install deb. Usually I use dpkg -i command. using --fix-broken option it also download the dependencies for google chrome.
19/12/2019
Crostini on Pixel Slate : LXD
Here is some reading on Using LXD on Chromebook Crostini
Using LXD on your Chromebook | Ubuntu Introduction On supported Chromebook, starting with Chrome OS 69, a new feature called Linux Apps was introduced. This allows Chrome OS users, on supported to install normal Linux applications from the Debian repository and have them integrate with the underlying Chrome OS desktop. The feature has e...
19/12/2019
Crostini on Pixel Slate : Setting up miniconda and jupyter notebook on Crostini
sudo bash Miniconda3-latest-Linux-xs86_64.sh
*note : where to install Miniconda - /opt/miniconda3
sudo chown -R williamsvincent /opt/miniconda3
* note : williamsvincent is the sample username here, change it with yours
source /opt/miniconda3/bin/activate
conda install -c conda-forge jupyterlab
jupyter-notebook
source :
https://installpython3.com/chromebook/
https://jupyter.org/install
Click here to claim your Sponsored Listing.
Category
Website
Address
Cyberjaya
63000