Skip to content

Instantly share code, notes, and snippets.

Giri Annamalai M giriannamalai

  • Aruppukottai
Block or report user

Report or block giriannamalai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@giriannamalai
giriannamalai / part.md
Created Jun 4, 2019 — forked from oisobstudio/part.md
Django Pagination Server-Side Menggunakan DataTable
View part.md

myapp/views.py

import json

from django.views.generic import View
from django.http import HttpResponse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Q
from django.core.serializers.json import DjangoJSONEncoder
@giriannamalai
giriannamalai / VideoStream.php
Created Jul 25, 2018 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
View VideoStream.php
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@giriannamalai
giriannamalai / JavaScript.sublime-build
Created Feb 16, 2018 — forked from corbanb/JavaScript.sublime-build
Sublime Text - Tools > Build System > New Build System
View JavaScript.sublime-build
// Sublime Text - Build System for Javascript
{
"cmd": ["node", "$file"],
"selector": "source.js"
}
@giriannamalai
giriannamalai / fork-example.php
Created Dec 23, 2017 — forked from nicksantamaria/fork-example.php
Example: Parallel processing in PHP using pcntl_fork()
View fork-example.php
<?php
/**
* @file
* Basic demonstration of how to do parallel threads in PHP.
*/
// This array of "tasks" could be anything. For demonstration purposes
// these are just strings, but they could be a callback, class or
// include file (hell, even code-as-a-string to pass to eval()).
@giriannamalai
giriannamalai / eloquent.md
Created Nov 14, 2017 — forked from msurguy/eloquent.md
Laravel 4 Eloquent Cheat Sheet.
View eloquent.md

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@giriannamalai
giriannamalai / Enhance.js
Created Nov 10, 2017 — forked from sebmarkbage/Enhance.js
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
You can’t perform that action at this time.