Skip to content

Instantly share code, notes, and snippets.

View kaustavdm's full-sized avatar

Kaustav Das Modak kaustavdm

View GitHub Profile
@kaustavdm
kaustavdm / web-mode-config.el
Last active July 5, 2017 12:52
Configuration for web-mode for Emacs 24 using Prelude
;; Disable whitespace-mode when using web-mode
(add-hook 'web-mode-hook (lambda () (whitespace-mode -1)))
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode)) ;; - For Drupal
(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\)$" . php-mode)) ;; - For Drupal
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.blade\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
@kaustavdm
kaustavdm / top_view.php
Created February 9, 2013 17:38
Code of top_view.php for web-mode issue #26. The indentation here is how web-mode was indenting the code when I did `M-x indent-region` on the entire buffer
<?php
/**
* Common top view
*/
if(base_url() == current_url()) {
$class = "front";
} else {
$class = "not-front";
}
@kaustavdm
kaustavdm / listinfo.html
Created May 30, 2013 13:41
Template of Mailman's general list information page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- $Revision: 5865 $ -->
<HTML>
<HEAD>
<TITLE><MM-List-Name> Info Page</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<P>
@kaustavdm
kaustavdm / php-fpm5.3.service
Created June 20, 2013 19:27
Systemd file for php-fpm 5.3 on Arch Linux
[Unit]
Description=The PHP 5.3 FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=forking
PIDFile=/run/php-fpm/php-fpm5.3.pid
PrivateTmp=true
ExecStart=/usr/bin/php-fpm5.3 --pid /run/php-fpm/php-fpm5.3.pid
ExecReload=/bin/kill -USR2 $MAINPID
@kaustavdm
kaustavdm / settings_local.py
Created October 7, 2013 18:51
Settings sample for Kuma
from settings import *
DATABASES = {
'default': {
'NAME': 'kuma',
'ENGINE': 'django.db.backends.mysql',
'HOST': 'localhost',
'USER': 'kuma',
'PASSWORD': '',
'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},
@kaustavdm
kaustavdm / style.css
Last active December 25, 2015 05:59
Fix bug 915146
.htab > ul > li > a {
text-decoration: none;
}
.htab > ul > li > a:hover, .htab > ul > li > a:focus {
text-decoration: underline;
}
/**
* @file Provides data structure for directed graphs
* @name Directed Graph
* @author Mr. Bean <mr@bean.com>
* @license MIT
* @copyright 2013 Mr. Bean
*/
/**
* A Graph object with the basic properties
@kaustavdm
kaustavdm / directed-graph_doxx.js
Created November 30, 2013 09:48
Directed graph data structure for Doxx
/**
* @file Provides data structure for directed graphs
* @name Directed Graph
* @author Mr. Bean <mr@bean.com>
* @license MIT
* @copyright 2013 Mr. Bean
*/
/**
* A Graph object with the basic properties
@kaustavdm
kaustavdm / Preferences.sublime-settings
Last active August 29, 2015 14:15
Sublime Text 2 user config
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
@kaustavdm
kaustavdm / abstract.md
Last active August 29, 2015 14:23
Unifying real-time communications with JavaScript

Title: Unifying real-time communications with JavaScript

Abstract:

WebRTC was devised as one of the means to overcome platform differences in communication technology. It pushed the web as a strong alternative to proprietary platforms. The role of JavaScript is very important in this stack as the language for unifying different types of clients.

Hoever, as more and more systems move towards exchanging large amount of information in real-time, there is an ever-increasing concern over platform fragmentations. Existing communication systems are not usually built to inter-operate with others. This results in multiple silos that prevent implementation of a unified layer of communication worldwide.

This talk explores how JavaScript is being used and how it can be used to build a fragmentation-less, globally available, decentralized communications network.