Linux Aliases

Linux Aliases are essentially shortcuts within the terminal app.  You can configure them in "/home/user/.bashrc",/home/user/bash.bashrc” or “/home/user/bash_aliases“.   Any command you enter in terminal can be shortened down to as little as two letters!

Examples:

  • user:~$ nano ~/.bashrc
  • user:~$ sudo nano ~/bash.bashrc
  • user:~$ sudo nano ~/.bash_aliases

Once you have nano open you can enter all the aliases you want to make terminal quick and efficient!

Syntax for aliases in .bash_aliases:

  • alias update='sudo apt-get update'
  • alias update='sudo apt-get update && sudo apt-get upgrade -y'

 

Hide files from Android Media Scanning

If you don’t want certain media files to show up in a media player, hide them!  You can tell that media player to not scan a folder by placing a file within it.

To prevent it from scanning the folder:

  1. Create a blank file and rename it “.nomedia“.
  2. Place the “.nomedia” file in the directory that you don’t want scanned.
  3. It’s as simple as that!

I was trying to stop voice recordings show up in Samsung Music Player app.  I created a folder inside of my downloads folder.  Next, I placed my “recording.amr” and “.nomedia” file in that folder.  This was the solution to prevent Samsung Music from scanning and displaying my “recording.amr” in my music list.

***You may have to use a different app to create and rename the blank file as the default My Files app on my S9+ would not allow the files to be renamed with a “.” at the front of the file name.  I personally had to use Microsoft Word to create the blank file and then use ASUS’s File manager app to rename the file. 

 

Windows 10 Search not working? Here’s the fix!

Nothing returned from your search term?  I recently had the same problem!  So I did some tinkering and looked into services.msc to see if maybe windows search was not running, but it was in fact running.  Next, I looked into “Change folder and search options” under the file menu.  Navigated to the search tab and decided to check the box for “Don’t use the index when searching in file folders for system files (searches might take longer)” and also checked the box for “Always search file names and contents (this might take several minutes)“.  I clicked “Apply” and then “OK“.  Finally, I attempted my search term again and voila! It worked!

folder search

Megabit vs Megabyte Explained

Internet Service Providers have marketed their speeds in Mbps or Megabits Per Second for years. It’s important to know the difference between Megabit and Megabyte, as they are two completely different metrics. Megabit is a lot smaller than a Megabyte.  If you want to calculate your actual download or upload speeds – you need to multiply the speed you’re getting by “.125“.  So, for example, if you’re getting 300 Mbps download speed from your ISP – you’re actually only getting 37.5 MBps Download speed.  This is a huge misconception with a lot of people thinking they are actually getting the 300 MBps speed!  To put it in perspective a SATA 3 (6 GBps) hard disk transfers data at a rate between 70 MBps to 120 MBps.  A USB 3.0 Thumb Drive will transfer data around 80 MBps to 130 MBps.  So in short, keep this in mind when you are shopping for an Internet service provider or upgrading your service.

Here is a chart so you can see how download rates compare to transfer rates.

Data Measurement Bit Byte Kilobyte [KB] Megabyte [MB] Gigabyte [GB]
Download Rate 1 or 0 8 Bits 1024B 1024K 1024MB
Transfer Rate NA NA 128b 128k 128mb

Fix Slow LAN File Transfers Windows 7, 8, 8.1 and 10!

Large Send Offload or “LSO” is a Property for your Network Adapter. It is supposed to reduce CPU usage and increase network performance. It doesn’t really help at all.  Disabling it can substantially increase file transfer rates on your local network.

You can get to Large Send Offload by going to Device Manager which is in your computers control panel. (Administrator Privileges are required)

  • Press Start and in the search box type “Device Manager“.  Select it from the list that populates.
  • Expand the list for Network Adapters and double click on your GBE Family Controller.  You can also right click and select Properties.
  • Select Advanced Tab.
  • Select Large Send Offload v2 (IPv4) and change the value to Disabled.
  • Select Large Send Offload v2 (IPv6) and change the value to Disabled.
  • Select OK.

You should restart your computer to see the change in speed.

 

If you do not see any difference in transfer rates, you should reset your network connection.

  • Open Command Prompt by pressing start and typing CMD.exe Right click on the option that populates and select Run As Administrator.
  • Type netsh winsock reset and press Enter.
  • Type netsh int ip reset and press Enter.
  • Type ipconfig /release and press Enter.
  • Type ipconfig /renew and press Enter.
  • Type ipconfig /flushdns and press Enter.

Once you have completed these steps you should notice a huge difference in file transfer rates over your local area network connection.  On my computer a file transfer rate increased from about 50 MB/s to 111 MB/s while transferring a file form my NAS to my desktop.

Map Shared Drives and Printers using Batch Scripts and Net Use Command

When I log into a new computer, I don’t like having to do a whole lot of configuration.  Net use command is the command line tool for mapping shared drives and printers.  You can combined it with a batch script to map shared storage drives and printers.  Now you have a really efficient tool at your disposal.  Here is a sample of one of my scripts.  If you would like to try and make your own batch script to automatically map a shared drive or printer with a click of an icon on your desktop.  Open up your notepad app and copy / paste the following script.  Once you are done editing the script in notepad app – Save it as a “.bat” file.

  • Swap out the placeholder with your share’s IP address (In example: \\192.168.X.X or \\domain.local).
  • If your share has spaces in its name use “\\yourserver.local\share name
  • Add as many shares and printers as you want by adding more Net Use lines in the script.

shared_mapping

 

Shared Drive Mapping Sample


echo off
title S Drive Automatic Mapping.

echo Creating new S: Drive Mapping...
net use S: \\yourserver.local\share

:exit
pause

 

Shared Printer Mapping using Net Use command


echo off
echo Mapping YourLocation Printer and Copier...
rundll32 printui.dll PrintUIEntry /in /n \\yourserver.local\PrinterName\
echo Mapping Maintenance Control Printer and Copier...
Net Use LPT1 \\yourserver.local\PrinterName\ /Persistent:Yes
:exit
pause

Speedtests and Network Jitter

Everyone should have a basic understating of Ping, Download Mbps/Kbps and Upload Mbps/Kbps in regards to network speed tests. Recently I noticed after an update that my speedtest.net app on my android now had another metric: Jitter. I took to google search and where else should you go to find reputable information on networking besides cisco! So I read up and basically network jitter is a measurement of congestion on Cellular Voice or VoIP Networks.  When a speed test is performed on a desktop or laptop computer the jitter metric is not displayed as they are not affected by jitter.  You will only see this metric on a mobile device speed test.  So the next time you make or receive a phone call and you notice that everything sounds robotic or garbled – that is network Jitter!

Here is the Cisco Definition of Jitter:

“Jitter is defined as a variation in the delay of received packets. At the sending side, packets are sent in a continuous stream with the packets spaced evenly apart. Due to network congestion, improper queuing, or configuration errors, this steady stream can become lumpy, or the delay between each packet can vary instead of remaining constant.”

Cisco – Understanding Jitter in Packet Voice Networks

Click here for a link to Speedtest.net Apps and select your platform.

Disable Adware and Spyware on Nox Player Android Emulator

I have been using Nox player for a while to emulate android on my desktop. I play a few different games on it when I don’t want to play on my phone.  Nox is highly configurable and you can do a lot with it.  One of the first things I noticed though was if I did not have VT enabled – the emulator was very sluggish!  Once enabled it was a night and day difference in performance.  After playing around with the emulator I soon noticed that it installs random apps Automatically!  I assume it is a scheme to where the developers of the emulator get money from installs.  After dealing with it for a while and deleting the random games and apps from the home screen, I finally just decided to search on google about it.  I found several videos that wanted root access to my computer and for me to change stuff in my C:\Windows\System32\drivers\etc folder.  I didn’t really feel comfortable giving that access much less root access to my computer.  I then found another YouTube video that had just the fix I needed!


I also decided to follow the advice and block the IP addresses for the domains that all of adware and spyware from Nox were going to and from.  I liked this idea more than changing the hosts file in C:\Windows\System32\drivers\etc

  1. Press start and type: CMD.exe
  2. Right click on CMD.exe and select “Run as Administrator”
  3. Copy and paste: netsh advfirewall firewall add rule name="Nox Block In" dir=in action=block remoteip=220.181.0.0-220.181.255.255,183.128.0.0-183.143.255.255,182.92.0.0-182.92.255.255,101.200.0.0-101.201.255.255,211.151.0.0-211.151.255.255,198.11.128.0-198.11.191.255,124.160.0.0-124.160.255.255,140.205.0.0-140.205.255.255,110.173.192.0-110.173.223.255,121.52.224.0-121.52.255.255,178.162.216.0-178.162.219.255
  4. Press Enter.
  5. Copy and Paste: netsh advfirewall firewall add rule name="Nox Block Out" dir=out action=block remoteip=220.181.0.0-220.181.255.255,183.128.0.0-183.143.255.255,182.92.0.0-182.92.255.255,101.200.0.0-101.201.255.255,211.151.0.0-211.151.255.255,198.11.128.0-198.11.191.255,124.160.0.0-124.160.255.255,140.205.0.0-140.205.255.255,110.173.192.0-110.173.223.255,121.52.224.0-121.52.255.255,178.162.216.0-178.162.219.255
  6. Press Enter
  7. Type Exit to close CMD.exe

This  will create a firewall rule in windows that will block all inbound and outbound connections to those IP addresses related to Nox.


References:

Windows Hot-Keys

keyboard

Everyone wants to make life easier, but I still watch co-workers, friends and family peck away at keys or doing things the long way around.  Utilizing these short-cuts will make your life a whole lot easier and you can accomplish your task more efficiently!  So without any further ado here are a few of my favorites!

  • Select all Ctrl + A
  • Cut selection or item(s) Ctrl + X
  • Copy selection or item(s): Ctrl + C
  • Paste selection or item(s): Ctrl + V
  • Switch between windows Alt Tab
  • Scroll between windows WinTab
  • Find Ctrl + F
  • Maximize Current window Win +
  • Minimize Current Window Win + ↓
  • Snap Window to the Left Win + ←
  • Snap Window to the Right Win +
  • Dual Monitor Snap Window to the Left Win + Shift +
  • Dual Monitor Snap Window to the Right Win + Shift +
  • Open Windows Explore Win + E
  • Open Run Menu Win + R
  • Open Task Manager Win + Shift + Esc