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   […]

How To Find Non-ASCII Characters in Vi

Author: , July 7th, 2015

To search for non-ASCII characters: /[^\d0-\d127] Use the substitute function to clean them up: :%s/[^\d0-\d127]/ /g

How To GZip Uncompressed Files Older Than a Week Using Find

Author: , August 29th, 2014

find . -mtime +7 ! -name “*.gz” -exec gzip {} \;

How To Find Which Button Was Clicked To Submit A Form Using jQuery

Author: , July 2nd, 2011

1 2 3 4 5 6 7 8 9 10 var WhichButton;   jQuery(’button’).live(’click’, function() {      WhichButton = this.id; });   jQuery(’form’).live( ‘submit’, function() {      alert( ‘Button ID: ‘ + WhichButton );      return false; }); var WhichButton; jQuery(‘button’).live(‘click’, function() { WhichButton = this.id; }); jQuery(‘form’).live( ‘submit’, function() { alert( […]

How To Delete Development File Versions (i.e. .css or .js)

Author: , June 30th, 2011

1 /usr/bin/find /my/dir -name "*.css" -a -not -name "*.min.*" -exec rm {} \; /usr/bin/find /my/dir -name “*.css” -a -not -name “*.min.*” -exec rm {} \;

How To Find The Next Instance Of A Class Using jQuery

Author: , June 20th, 2011

1 var Obj = jQuery(this).parent().nextAll(’.myClass:first’); var Obj = jQuery(this).parent().nextAll(‘.myClass:first’);

How To Search For And Delete Lines Globally In Vim

Author: , November 27th, 2010

Delete all comment lines: :g/^#/d Delete all blank lines: :g/^$/d