вівторок, 23 червня 2020 р.

Delete infinite rows and columns in MS Excel / Google Sheets

Excel is a pretty powerful tool, but in order to get the most of it, you need to customize your sheets.
By default it might have so many rows and columns that you might want to get rid of.
This is how to do it

  •  Ctrl+Shift+Right arrow to select all columns on the right from the current one
  •  Ctrl+Shift+Down arrow to select all rows below the current one
Then just simply chose "Delete columns"or "Delete Rows".
That's it!

References:

четвер, 4 червня 2020 р.

AWS: Get AWS AccountID from CLI

Here's the way to quickly find your AWS details, including account ID, from CLI
aws sts get-caller-identity
To get AccountID only, use queries and customize output text
aws sts get-caller-identity --output text --query 'Account'

That's it!

References:




четвер, 22 лютого 2018 р.

Properly configuring an external monitor via HDMI (disable HDMI overscan)

My primary monitor is having some bad times, so I needed to connect my old good backup monitor. Tried both ports, but picture looked cropped, colors were crazy and I was almost mad. Tried some OS software, but result was pretty crappy.

Then, eventually, after reading one of the guides from software found that HDMI overscan needs to be disabled. Some newer models might automatically detect what is conencted, and set proper mode, disabling HDMI overscan, but as I told, my backup device is pretty old. Checked its settings and did not find anything. Then finally googled a solution - I needed to rename source name in TV settings! Menu => Source List => Edit name. Renamed it to "DVI PC" (chosen from list of predefined names), and finally - picture became nice and properly sized :)

References:
  • https://support.displaylink.com/knowledgebase/articles/611877
  • https://www.engadget.com/2010/05/27/hd-101-overscan-and-why-all-tvs-do-it/
  • http://www.storageforum.net/forum/showthread.php/8905-How-to-Disable-overscan-on-a-Samsung-quot-SMART-quot-tv-solved

понеділок, 22 січня 2018 р.

Pasting text without formatting (Windows)

Everyone is working with text and using clipboard nowadays. And I often need to paste text without formatting. Shame to me, but I've used a notepad as a mediator. But today decided to search for a shortcut and found it pretty quickly
Ctrl+Shift+V will do the trick on Windows.
References:
  • http://blog.gilbertconsulting.com/2008/08/paste-without-formatting.html



неділя, 10 грудня 2017 р.

WiFi settings backup on Windows 8

One of things that I hate is when you ask to provide you WiFi password in cafe but they simply type it on your device and connect instead of providing the password itself. And on some devices it may be really tricky just to find out existing settings.

Windows OS offers pretty good and simple way for having all WiFi networks dumped and backed up. You can easily find credentials to any network you've been connected before and use it on your another device.

WiFi_Backup.sh
set BACKUP_DIR="C:\Backup"set TMP_DIR="%BACKUP_DIR%\WiFI"set CUR_DATE=%date:~-4%_%date:~3,2%_%date:~0,2%mkdir %TMP_DIR%cd %BACKUP_DIR% echo Performing WiFI backup...netsh wlan export profile key=clear folder="%TMP_DIR%"
echo Adding to archive..."c:\Program Files\7-Zip\7z.exe" a -t7z "%BACKUP_DIR%\WiFi_Backup_%CUR_DATE%.7z" "%BACKUP_DIR%\WiFi\"
echo Removing files...del /F /Q "%TMP_DIR%\*.*" rmdir %TMP_DIR%

References:

  • https://winaero.com/blog/how-to-backup-your-wireless-network-profiles-in-windows-8-1-and-windows-8/
  • https://stackoverflow.com/questions/1192476/format-date-and-time-in-a-windows-batch-script



понеділок, 12 травня 2014 р.

WinSCP: General failure

WinSCP is a very nice tool for managing your server content form desktop OS. Meantime it sometimes can provide you very confusing error reports. For example, look at this:
General failure (server should provide error description).
Error code: 4
Error message from server:
Failure Request code: 14 

And who knows what's wrong?! Quick googling show that issue is caused by 100% full drive, so all you need is just clean up some space. And this confusing message is gone :)

References:
http://winscp.net/forum/viewtopic.php?t=1668

середа, 30 квітня 2014 р.

Ubuntu: Removing all legacy unused kernels

Sometimes you need to care about each MB of disk space. You are starting to cleanup drives, but there's nothing obviously can be deleted. In such cases you an free-up some space (from dozens to hundreds of MB) by removing all legacy system kernels.
In such case please make sure you are running the latest kernel version
Compare outputs for
uname -r
and
dpkg -l | grep linux-image
Probably you may need to reboot! Then just issue the following command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get purge
References:
http://ubuntugenius.wordpress.com/2011/01/08/ubuntu-cleanup-how-to-remove-all-unused-linux-kernel-headers-images-and-modules/