Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jayeshanandani's full-sized avatar

Jayesh Anandani jayeshanandani

View GitHub Profile
@jayeshanandani
jayeshanandani / blog.md
Created January 23, 2018 02:21 — forked from JacobBennett/blog.md
Clean up your Vue modules with ES6 Arrow Functions

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({
@jayeshanandani
jayeshanandani / sql.provider.ts
Created December 26, 2016 14:54
SQL provider
import {Injectable} from "@angular/core";
import {Platform} from "ionic-angular";
const DB_NAME: string = '__ionic';
const win: any = window;
@Injectable()
export class Sql {
private _db: any;
@jayeshanandani
jayeshanandani / add.ctp
Last active August 29, 2015 14:16 — forked from anonymous/add.ctp
<?php
echo $this->Html->css('../js/plugins/datepicker/datepicker', array('inline' => false));
echo $this->Html->script('plugins/datepicker/bootstrap-datepicker', array('inline' => false));
echo $this->Html->css('../js/plugins/fileupload/bootstrap-fileupload', array('inline' => false));
echo $this->Html->script('plugins/fileupload/bootstrap-fileupload', false);
echo $this->Html->script('holder', false);
$this->extend('/Layouts/portlet');
$this->assign('contentHeader', $contentHeader);
T 1398665062 18<diverdude> Im working on this site :) http://eatincommon.com
T 1398665084 20<jcool>30 wow. all in cakephp? :)
T 1398665091 18<diverdude> yeah hehe
T 1398665095 18<diverdude> pure cake
T 1398665098 20<jcool>30 thats amazin
T 1398665115 18<diverdude> its my little baby hehe...i work on it in my sparetime
T 1398665136 20<jcool>30 thats damn amazin. how many years in cakephp development? :)
T 1398665178 18<diverdude> uhhm. well its difficult to say...i only work some evenings and some weekends...but started it in August
T 1398665190 20<jcool>30 thats good :)
T 1398665217 18<diverdude> do you llike it :)