How To Locate Attached Disk Devices in Linux

Author: , April 24th, 2018

https://linux.die.net/man/8/lsblk # lsblk -a 1 2 3 4 5 NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT nvme1n1       259:0    0  100G  0 disk /volumes/data nvme0n1       259:1    0   20G  0 disk ├─nvme0n1p1   259:2    0   20G  0 part / └─nvme0n1p128 259:3   […]

April 19th and Snow is Falling

Author: , April 19th, 2018

April 17th and Snow is Falling

Author: , April 17th, 2018

How To Move in vim Using the Keyboard

Author: , March 21st, 2018

h move one character left j move one row down k move one row up l move one character right w move to beginning of next word b move to previous beginning of word e move to end of word W move to beginning of next word after a whitespace B move to beginning of […]

How To Scroll to the Top of the Page using Javascript

Author: , March 20th, 2018

window.scrollTo(x-coord, y-coord); Example: window.scrollTo(0,0);

R.I.P. Stephen Hawking

Author: , March 14th, 2018

How To Expand a Filesystem on AWS Linux

Author: , March 6th, 2018

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html This only works on the new expandable volumes. YMMV, as always. 1. Examine file -s /dev/xvd* lsblk df -h 2. Grow partition Expand the modified partition using growpart (and note the unusual syntax of separating the device name from the partition number): growpart /dev/xvda 1 lsblk 3. Expand filesystem resize2fs /dev/xvda1 df -h

How To Strip Windows Newlines in PHP

Author: , February 21st, 2018

$text = str_replace(“\r”, “”, $text);

Dogs are Evil

Author: , February 12th, 2018

We need dog leash laws and owner accountability. Dog bites are a problem. According to the American Veterinary Medical Association, 4.5 million Americans are bitten by dogs each year, and every day, nearly 1,000 individuals show up in hospital emergency rooms because of dog attacks. The annual cost of medical treatments for dog bites (including 27,000 reconstructive […]

How To Create and Restore an SVN Backup Dump File (.dmp)

Author: , February 1st, 2018

Backup Compressed: svnadmin dump /volumes/data/svn/yourRepo | gzip -9 > /volumes/data/backup/yourRepo.dmp.gz Backup Uncompressed: svnadmin dump /volumes/data/svn/yourRepo > /volumes/data/backup/yourRepo.dmp Restore the Repo Create a new SVN repository: svnadmin create /volumes/data/svn/newRepo Restore the dump file to the new repository: svnadmin load /volumes/data/svn/newRepo < /volumes/data/backup/yourRepo.dmp Just for good measure, here is how to checkout from a local repo: svn […]