Skip to content

Instantly share code, notes, and snippets.

View dhavalv's full-sized avatar

Dhaval Tailored dhavalv

  • Tailored Solution Pvt Ltd
  • Ahmedabad
View GitHub Profile
@dhavalv
dhavalv / php_basePath_And_URL.md
Last active February 6, 2017 06:56
PHP Document Root, Path and URL detection
Variable Content
base_dir /var/www/mywebsite
doc_root /var/www
base_url /mywebsite
protocol http
port 8080
domain example.com
full_url http://example.com:8080/mywebsite
@dhavalv
dhavalv / virtul_hosts_xampp_ubuntu.md
Last active March 26, 2019 19:22
How to create virtual hosts in xampp Ubuntu 12.04

How to create virtual hosts in xampp Ubuntu 12.04

  • Uncomment below line from /opt/lampp/etc/httd.conf
#open with sublime
sudo subl /opt/lampp/etc/httpd.conf

# Virtual hosts
Include etc/extra/httpd-vhosts.conf
@dhavalv
dhavalv / xampp.md
Created January 24, 2017 06:45
Xampp Installation

Xampp Installation

Download xampp Image & make executable mode then run it.

#download xampp
sudo wget https://www.apachefriends.org/xampp-files/5.6.28/xampp-linux-x64-5.6.28-1-installer.run

#make executable mode of run file
sudo chmod +x xampp-linux-x64-5.6.28-1-installer.run
@dhavalv
dhavalv / LAMP_Stack_Installation.md
Last active August 26, 2020 20:15
Document for lamp stack is only apache 2.4 & php5.6 Installation...

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 12.04

About Lemp

LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the virtual private server is already running Ubuntu, the linux part is taken care of. Here is how to install the rest.

If any existing lamp installation & you need to upgrade your old server, uninstall all things & backup first all databases & files.

sudo apt-get purge php5*
@dhavalv
dhavalv / 360_panaroma_facebook.md
Last active January 13, 2017 07:36
How to make 360 image for facebook post?

How to make 360 image for facebook post?

  • Try 1: Download Any 360 Panaroma Image or take snapshot from 360 video
  • Try 2: Create panaroma image and change metadata using below command:
exiftool -ProjectionType="equirectangular"-UsePanoramaViewer="True"-"PoseHeadingDegrees<$exif:GPSImgDirection"-"CroppedAreaImageWidthPixels<$ImageWidth"-"CroppedAreaImageHeightPixels<$ImageHeight"-"FullPanoWidthPixels<$ImageWidth"-"FullPanoHeightPixels<$ImageHeight"-CroppedAreaLeftPixels="0" -CroppedAreaTopPixels="0" "image_path"

exiftool  -Make="RICOH" -Model="RICOH THETA S" "image_path"

You need to install exiftool in your system or change from online: http://www.thexifer.net/

@dhavalv
dhavalv / ionic_development_environment.md
Last active December 26, 2016 05:28
Develop Iconic application using corodova and build apk file using gradle. Setup environment for iconic application development in Ubuntu 12.04.

Setup environment for iconic app development in Ubuntu 12.04.

  • Install nodejs, ionic & corodova 1.Install nodejs
    curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
    sudo apt-get install nodejs
    sudo apt-get install build-essential
    nodejs -v
    npm -v
    

Installing Ionic on Ubuntu

Hello,

nowadays I am working in a project with ionic framework. Ionic is an advanced HTML5 Hybrid Mobile App Framework. It’s an open-source front-end framework for creating beautiful mobile applications using HTML5.

Ionic apps are based on Cordova, so Cordova utilities can be used to build, deploy and test apps. Ionic focuses on the look and feel of apps and it currently uses AngularJS to build awesome looking front-ends.

Since I needed to install Ionic on ubuntu and I did it in some steps to do it, I resolve to write these steps and write this post. I hope you enjoy it.😉

@dhavalv
dhavalv / Find_Java_Path.md
Last active December 22, 2016 08:15
Java installation and find path

You need to dig into symbolic links. Below is steps to get Java directory

Step 1:

$ whereis java
java: /usr/bin/java /etc/java /usr/share/java

That tells the command java resides in /usr/bin/java.

Dig again:

@dhavalv
dhavalv / test.md
Created December 16, 2016 13:08
jsx
import React from 'react';
import { FormControl, FormGroup, Radio, Checkbox, Button, ControlLabel,HelpBlock } from 'react-bootstrap';

class Login extends React.Component {
    constructor(props){
        super(props);
        this.state = {
            username: '',
            password: '',
  • Create React Component: App.jsx
var React = require('react');
class App extends React.Component {
    render() {
        return (
            <div>
                <h1>Header</h1>
                <h2>Content</h2>
 This is the content!!!