Skip to content

Instantly share code, notes, and snippets.

View yashbarot's full-sized avatar
:octocat:
Hustling

Yash Barot yashbarot

:octocat:
Hustling
View GitHub Profile

Real-time Grid Component with Laravel, Vue.js, Vuex & Socket.io (Google Docs-like Functionality)

Motivation

The exercise of writing this tutorial -- as well as recording it as a screencast -- has helped me better understand the concepts behind a couple of my favorite open source tools. Both the tutorial and screencast will be of personal use in the future as references. If they are of help to others, that will be great too.

I love Google Docs' real-time, multi-user interactive capability, and I've have always been a fan of spreadsheets. I wanted to see if I could replicate that type of functionality. What I've done is taken the basic Vue.js Grid Component example and altered it a bit so that when a user clicks on a cell, that cell becomes highlighted or "active", not just in the user's browser but in any browser instance cur

@yashbarot
yashbarot / PHPExcel_Basics.md
Created May 18, 2017 08:35 — forked from r-sal/PHPExcel_Basics.md
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

@yashbarot
yashbarot / wkhtmltopdf_wkhtmltoimage.md
Created March 1, 2017 12:02 — forked from isogram/wkhtmltopdf_wkhtmltoimage.md
How to manually install Wktohtmlpdf and Wkhtmltoimage in Ubuntu Server

How to Install Wkhtmltopdf and Wkhtmltoimage in Ubuntu

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin/
sudo mv wkhtmltopdf  /usr/bin/wkhtmltopdf
sudo mv wkhtmltoimage  /usr/bin/wkhtmltoimage
@yashbarot
yashbarot / gist:20e36bcf0d51319c3d7a9842c312ec76
Created January 22, 2017 15:52
JavaScript: Using HTML5 local storage and jQuery to persist form data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Local Storage Example</title>
<!-- include Bootstrap CSS for layout -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
@yashbarot
yashbarot / Laravel PHP7 LEMP AWS.md
Created January 12, 2017 11:03 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@yashbarot
yashbarot / PhotoApiTest.php
Created November 25, 2016 17:16 — forked from JeffreyWay/PhotoApiTest.php
Testing APIs in Laravel. Thoughts?
<?php
class PhotoApiTest extends TestCase {
public function setUp()
{
parent::setUp();
Route::enableFilters();
@yashbarot
yashbarot / ColorHelpers.css
Last active November 25, 2016 07:22
List of Color Helpers
/* background-color is set to primary base color*/
.bg-primary-color-base {
background-color: #37474f;
}
/* color is set to primary base color*/
.text-primary-color-base {
color: #37474f;
}
/*margin for all sides is set to 0px*/
.m-0 {
margin: 0;
}
/*margin for top side is set to 0px*/
.m-top-0 {
margin-top: 0;
}
@yashbarot
yashbarot / RouteServiceProvider.php
Created November 24, 2016 06:06
Load Routes from Routes Folder
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
@yashbarot
yashbarot / Helpers.md
Last active November 22, 2016 04:22
Bootstrap Helpers

Change Text Color using default classes

<p class="text-muted">...</p>
<p class="text-primary">...</p>
<p class="text-success">...</p>
<p class="text-info">...</p>
<p class="text-warning">...</p>
<p class="text-danger">...</p>