Skip to content

Instantly share code, notes, and snippets.

View cynx's full-sized avatar
👓
blow

cynx cynx

👓
blow
View GitHub Profile
@cynx
cynx / reactClassComponent
Created February 18, 2017 18:03
React / Redux Templates for WebStorm
import React, {Component, PropTypes} from 'react';
class $NAME extends Component {
constructor(props, context){
super(props, context);
}
render(){
return (
<div>
</div>
var inherits = function (ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
var inherits = function (ctor, superCtor) {
ctor.super_ = superCtor;
Object.setPrototypeOf(ctor.prototype, superCtor.prototype);
};
function Manager(managerName) {
this.managerName = managerName;
}
@cynx
cynx / index.html
Created November 18, 2015 11:52 — forked from thathurtabit/index.html
A CodePen by Stephen Fairbanks. Super Simple Progress Bar - This progress bar uses the HTML5 custom data-* attribute to allow for quick updating to a progress bar animated by Zepto (or jQuery). The animation is wrapped in a window.resize function to reanimate if the browser size is changed.
<!-- Change the below data attribute to play -->
<div class="progress-wrap progress" data-progress-percent="25">
<div class="progress-bar progress"></div>
</div>
@cynx
cynx / index.js
Created August 21, 2015 10:28
index.js - no vertical scroll
$(document).ready(function () {
$('#datatab tfoot th').each(function () {
$(this).html('<input type="text" />');
});
var oTable = $('#datatab').DataTable({
"serverSide": true,
"ajax": {
@cynx
cynx / HomeController.cs
Created August 17, 2015 11:59
HomeController.cs file for the JQUERY DATATABLES 1.10+ AND ASP.NET MVC 5 SERVER SIDE INTEGRATION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCDatatableApp.Models;
namespace MVCDatatableApp.Controllers
{
public class HomeController : Controller
@cynx
cynx / ResultSet.cs
Created August 17, 2015 11:58
ResultSet.cs file for the JQUERY DATATABLES 1.10+ AND ASP.NET MVC 5 SERVER SIDE INTEGRATION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls; //For SortBy method
using System.Web.Mvc;
using MVCDatatableApp.Models;
namespace MVCDatatableApp
@cynx
cynx / DatatablesViewModel.cs
Created August 17, 2015 11:02
DatatablesViewModel.cs of JQUERY DATATABLES 1.10+ & ASP.NET MVC 5 SERVER SIDE INTEGRATION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
///This view model class has been referred from example created by Marien Monnier at Soft.it. All credits to Marien for this class
namespace MVCDatatableApp.Models
{
/// <summary>
/// A full result, as understood by jQuery DataTables.
@cynx
cynx / index.js
Created August 17, 2015 10:50
index.js of JQUERY DATATABLES 1.10+ & ASP.NET MVC 5 SERVER SIDE INTEGRATION
$(document).ready(function () {
$('#datatab tfoot th').each(function () {
$(this).html('<input type="text" />');
});
var oTable = $('#datatab').DataTable({
"serverSide": true,
"ajax": {
@cynx
cynx / index.cshtml
Created August 17, 2015 10:39
index.cshtml of JQUERY DATATABLES 1.10+ & ASP.NET MVC 5 SERVER SIDE INTEGRATION
@{
ViewBag.Title = "Home Page";
}
@model IEnumerable<MVCDatatableApp.Models.Customer>
<!doctype html>
<html>
<head>
<title>@ViewBag.Title - MVC Datatables App</title>