Skip to main content

Posts

Easily rename multiple files / image files with incremental number in Ubuntu

Why it is IMPORTANT to rename our IMAGE file names before uploading / posting to the internet world? this is because it helps the Search engine to understand what images is that or its relevant  Proper naming allow keyword inclusion too instead just the image name Will redirect traffic to your blog/website when user search using Google Images! knowing that. Its very important to rename our images / files properly. BUT WAIT, my 1 blog post can have 10 IMAGES man! no worries, you can group related images and rename by adding the numbering at the end of it! With ubuntu renaming its REALLY easy man! Renaming multiple files step 1 - Select the images that you are interested in Renaming multiple files step 2 - Right click and select rename Renaming multiple files step 3 - type in the image name, the best is to include keyword too Renaming multiple files step 4 - click the add button, and select how do you want the files is differentiated; using number, ...

Old laptop F11 key is broken ..how to solve in windows 7 and linux(debian 10)?

Hi all. Adding this note so that i dont forget. Btw recently im starting to use back my old laptop . And noticed that the keyboard key for f11 is broken man!. broken!. so the effect of this brokenness is my browser keep resizing from full mode to normal mode. yeah that's the shortcut key. And when i'm on my virtual box linux, the browser + the terminal window will keep maximizing and back to normal window size. Watch this to understand what im trying This is damn irritating. and it slowed down my work....which then i have to switch back to use my office laptop... Ok then to verify this on windows i ll need to use a tester tool called  keyboard test software  . for linux this can be verify easily using xev tool. After verifying. yeah its true that the key is broken! After googling around found out the workaround for it. 1. need to disable the key. for windows i can only achieve that by using an external tool again! this time a tool called  simple...

Linux playing with end of line

I was trying to figure out why the checksum of file on the server having different value with the same file that being optimized by pagespeed.   It turns out, that pagespeed has a filter-whitespace-collapse   and the filter is enabled on our server.This filter will remove any unnecessary whitespace. So happen that the original file has one end line added, while the file that being optimized by pagespeed doesnt has that. to quickly validate this. i tried to search easiest way to check a file with end of line cat -E /tmp/script1 document.write("hello Recently, I published an")$ I can see that the script has end of line, "$" is the indicator. then i quickly search again, what is the simplest way to remove end of line in linux. tr -d "\n" /tmp/script1_removed_el the command actually will delete all newline in the file and output it to /tmp/script1_removed_el. Ok this is working for current scenario where my file is expected to be in one...

Python regex finditer

Just a revision for me, sharing with you all! so i have problem to find multiple keywords in a text. i tried using re.search. but that wouldnt work. as re.search only applicable if keyword found first in a group match. so, lets go ahead! i ran using python2.7 Example code for find keywords appearance using python re.finditer (regex) search_keywords = ["smart", "high", "confident", "mature"]  Now we join the keywords with OR operator | , it will looks something like this  smart|high|confident|mature search_patterns = "|".join(search_keywords) Sample input text text = "This is a story about a girl. Living in a secluded area in Wonderland.\n" \        "She is small but very smart and smart, how ever she has verly low confident. Dont judge a book" \        "by its cover.\n The way she thinks shown how mature she is."  Now we update the pattern again with ( ) - > parenthesis  The object ...