Julius Goh Blog
Cron’s php script pathing issue
Php include/require pathing is related to how you run your script in cron for example you are having a PHP script in /var/www/html/phpscript/project1/index.php , And below is how the scripts include the files <?php...
Vim Folding ( Marker Method )
Hi, today i’ll be talking about folding for vim. Folding is to fold codes from line to line to have a better view on codes. today i will be demonstrating marker fold method for...
EDM – Electronic Direct Mail
Hi i’ve recently start doing some research on EDM. Different platform ( Desktop App , Mobile App, Web Mail ) for different product (Gmail , Yahoo , AOL….) will have different can & can’t...
Mysql DB allowing old user from different IP with same grants
Firstly, We have to create a new user from different ip , so we have to run the below command. The first “Select” query is to get all column in user table and the...
Mysql Procedure creation
Procedure Creation Example MariaDB [stress]> DELIMITER ;; MariaDB [stress]> CREATE PROCEDURE ABC() -> BEGIN -> WHILE 1 -> DO -> SELECT COUNT(*) FROM stresstable; -> DO SLEEP(1); -> END WHILE; -> END;; MariaDB [stress]>...
Color Schemes ( Vim )
$ #ls -l /usr/share/vim*/colors To set it permanently go to ~/.vimrc, set color default
Javascript Get All Class element and convert it into array
var elems = Array.prototype.slice.call(document.querySelectorAll(‘.js-switch’)); Explanation: document.querySelectorAll(‘ClassName ID’) – Get All Class or id element and put into object Array.prototype.slice.call – Convert Object into Array Looping:- elems.forEach(function(html) { ### Your Code Here ### });
Gnome Terminal – ssh execute with command
gnome-terminal –command ‘ssh -t -p22122 julius@jumper.aims.tameko.co “tmux a”‘
Shell Scripting Accepting Argv , getops , checking , echoing
#!/bin/bash #getopts checking for argv and define it into variables #options that needs to receive parameter have to enter : after the option EG: f:u:d: #In This Example h does not accept parameter. it...