Skip to content

Instantly share code, notes, and snippets.

View jinkrish's full-sized avatar

Jino R Krishnan jinkrish

View GitHub Profile
#configure default nvm
nvm alias default v5.6.0
#list available node verions
nvm ls-remote
#install a specific version
nvm install v5.6.0
#to list installed node versions
nvm ls
#use a specific version
nvm use v5.6.0
#installation
nvm install stable
#usage
nvm use stable
source ~/.profile
source ~/.bashrc
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
sudo apt-get update
sudo apt-get install build-essential libssl-dev
(function($){
$.fn.plugin = function(options){ }
})(jQuery);
/**
Usage: $("#selector").plugin(options);
**/
(function($){
$.fn.plugin = function(options){ }
})(jQuery);
@jinkrish
jinkrish / index.html
Last active January 21, 2017 22:04
jQuery plugin
<html>
<head>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
</head>
<body>
<div id="mydiv" ></div>
<script src="jquery.myplugin.js" ></script>
<script>
$("#mydiv").myplugin({
debug: true,
<?php
interface sessionStorage{
public function get($key);
public function set($key,$value);
}
class fileSessionStorage implements sessionStorage {
public function get($key){
...
}
public function set($key,$value){