#regex match IP address
%s/\d{1,3}%(.\d{1,3}){3}//g
#regex match IP address
%s/\d{1,3}%(.\d{1,3}){3}//g
#Selecting a database: mysql> USE database;
#Listing databases: mysql> SHOW DATABASES;
#Listing tables in a db: mysql> SHOW TABLES;
#Describing the format of a table:
| #delete 0 byte files in current directory only: | |
| find . -maxdepth 1 -size 0c -exec rm -f {} \; | |
| #recursively: | |
| find . -size 0c -exec rm -f {} \; |
| search replace multiple files in directory | |
| for fl in *; do mv $fl $fl.old sed 's/the_old_text/the_new_text/g'; $fl.old > $fl; rm -f $fl.old; done; |
| #this will delete everything after the first comma | |
| perl -ne '/^([^,]+)/ and print "$1\n"' < something.file > cleaned_output.file |
| (execute in the directory you want to start the search from) | |
| find . -exec grep -l "term to search for" {} \; |
| Ti.App.addEventListener('openSideMenu', function() { | |
| xwin.presentMenuViewController(); | |
| }); | |
| xwin.addEventListener("didShowMenuViewController",function() { | |
| mainWin.borderRadius = 8; | |
| for( var r = 0 ; r < menuTable.data[0].rows.length ; r++){ | |
| menuTable.data[0].rows[r].children[0].styleClass = 'lianim'; | |
| } |