24 Nov

Database Data to Download Variables

Gets data from a MySql database, splits the data into separate columns, then uses one column in a URL to download something – and uses other column to name the file thats downloaded

for i in $(mysql -u root Project_Madapp -sNe 'SELECT CONCAT(id,",",name) AS yo FROM City WHERE type="actual"'); do parts=(${i//,/ }); wget -O "${parts[1]}.csv" "http://localhost/student_allocation_csv.php?format=csv&city_id=${parts[0]}"; done

16 Mar

Closing WhatsApp on Nokia E72

First install the app called MobileGuard. Its a cool app. I’ll recommend it even if you want to keep whatsapp. Next, open MobileGuard, and go to Clean Spam > Memory Cleaning > Clear in Batch > Select WhatsApp. Now select the ‘Off’ option. This should close the app and all its services

Keep in mind that whatsapp will start again when you restart your phone. If you want to turn that off, go to Boot Mgr in Mobile Guard and disable it.

11 Aug

Send One Line From a Text File as as SMS Every 10 Mins

This command will send a line from a given text file one every 10 mins as an SMS to a given number.


i=1; while [ 1 ]; do sms INSERT_PHONE_NUMBER "$(cat "/home/binnyva/sms.txt"|head -n$i|tail -n1)"; sleep 10m; i=$(expr $i + 1); done

Script calls the command ‘sms’ – you can define that command however you want. In my case, its a variation of this script.