Quick Setup for WordPress Child Themes

Quick Setup for WordPress Child Themes

Create Folder abcdefg-child Create CSS File style.css /* Theme Name: ABCDEFG Child Theme URL: http://themes.webdevia.com/osterisk-voip-cloud-services-wordpress-theme Description: ABCDEFG Theme Child Author: Dwij IT Solutions Author URL: https://dwijitsolutions.com Template: abcdefg Version: 1.0.0 Text Domain: abcdefg-child */ Create Functions.php Files <?php add_action( 'wp_enqueue_scripts', 'enqueue_child_styles', 100); function enqueue_child_styles() { wp_enqueue_style( 'child-style', get_stylesheet_directory_uri().'/style.css'); } ?>

September 29, 2017 · 1 min · Ganesh Bhosale
Getting started with Cloud Commander – Best File Manager for your VPS

Getting started with Cloud Commander – Best File Manager for your VPS

sudo apt-get install npm npm i cloudcmd -g Create Configuration: sudo nano ~/.cloudcmd.json Put Content { "name": "", "auth": true, "username": "root", "password": "", "algo": "SHA1", "editor": "edward", "packer": "zip", "diff": true, "zip": true, "buffer": true, "dirStorage": true, "online": true, "open": false, "oneFilePanel": false, "keysPanel": true, "port": 8000, "ip": null, "root": "/var/www", "prefix": "", "progress": true, "confirmCopy": true, "confirmMove": true, "showConfig": false, "showFileName": true, "contact": true, "configDialog": true, "console": true, "syncConsolePath": false, "terminal": false, "terminalPath": "", "terminalCommand": "", "terminalAutoRestart": true, "vim": false, "columns": "name-size-date-owner-mode", "export": false, "exportToken": "root", "import": false, "import-url": "http://localhost:8000", "importToken": "root", "importListen": false, "log": true } Put Password:...

August 16, 2017 · 1 min · Ganesh Bhosale
All you need for VSCode Laravel Setup

All you need for VSCode Laravel Setup

Visual Studio Code Tut https://laracasts.com/series/visual-studio-code-for-php-developers Keyboard changes: Go to Symbol in File -> Cmd + R Go to Symbol in Workspace -> Cmd + shift + R User Settings { "extensions.ignoreRecommendations": true, "typescript.check.npmIsInstalled": false, "editor.tabSize": 4, "editor.insertSpaces": true, "emmet.syntaxProfiles": { "blade": "html" }, "workbench.activityBar.visible": true, "editor.minimap.enabled": false, "workbench.panel.location": "right", "explorer.openEditors.visible": 0, "editor.detectIndentation": false, "git.confirmSync": false, "git.autofetch": true, "window.zoomLevel": 0, "explorer.confirmDelete": false, "todohighlight.keywords": [ { "text": "NOTE:", "isWholeLine": false, "color": "#ff0000", "backgroundColor": "yellow", "overviewRulerColor": "magenta" }, { "text": "TODO:", "isWholeLine": true, "color": "white", "border": "1px solid #FFFFFF", "borderRadius": "20px", "backgroundColor": "#48b0f7", "overviewRulerColor": "#48b0f7" } ], "todohighlight....

May 23, 2017 · 1 min · Ganesh Bhosale
Creating TimeAgo function in PHP

Creating TimeAgo function in PHP

Many times while displaying time on website we need to do something extra. This function script can give you time in days/hour/minutes/seconds ago format. You just need to pass the mysql time to this function. like this: echo timeago("2013-11-24 18:00:09"); function timeago($timeStr) { $time = strtotime($timeStr); $output = ""; $time_difference = time() - $time; $seconds = $time_difference ; $minutes = round($time_difference / 60 ); $hours = round($time_difference / 3600 ); $days = round($time_difference / 86400 ); $weeks = round($time_difference / 604800 ); $months = round($time_difference / 2419200 ); $years = round($time_difference / 29030400 ); if($seconds <= 60) { // Seconds $output = "$seconds seconds ago"; } else if($minutes <=60) { //Minutes if($minutes==1) { $output = "one minute ago"; } else { $output = "$minutes minutes ago"; } } else if($hours <=24) { //Hours if($hours==1) { $output = "one hour ago"; } else { $output = "$hours hours ago"; } } else if($days <= 7) { //Days if($days==1) { $output = "one day ago"; } else { $output = "$days days ago"; } } else if($weeks <= 4) { //Weeks if($weeks==1) { $output = "one week ago"; } else { $output = "$weeks weeks ago"; } } else if($months <=12) { //Months if($months==1) { $output = "one month ago"; } else { $output = "$months months ago"; } } else { //Years if($years==1) { $output = "one year ago"; } else { $output = "$years years ago"; } } return $output; } Note : Sometimes you may get time error while using this function because of timezone....

December 24, 2016 · 2 min · Ganesh Bhosale
Mobile OS detection in PHP CodeIgniter

Mobile OS detection in PHP CodeIgniter

For doing this there is one good plugin called “Mobile Detect”. Just download library from https://github.com/serbanghita/Mobile-Detect Put Mobile_Detect.php inside libraries folder of ci application. Whenever you need to detect the OS or any other parameter, use following code: public function index() { $this -> load -> library('Mobile_Detect'); $detect = new Mobile_Detect(); if ($detect->isMobile() || $detect->isTablet() || $detect->isAndroidOS()) { header("Location: ".$this->config->item('base_url')."/mobile"); exit; } } You can find variety of functions like this in here:...

December 11, 2013 · 2 min · Ganesh Bhosale
Raspberry Pi in Pune

Raspberry Pi in Pune

So many times it happens where we need to deploy our Software/Embedded Project on Hardware. Only problem comes is creating Hardware based on ARM Processor & all its time consuming interfacing. But there is a way to skip all this lengthy stuff known as Raspberry Pi [Official Website: http://www.raspberrypi.org]. So What is Raspberry Pi: The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools....

October 21, 2013 · 4 min · Ganesh Bhosale