Skip to content

Instantly share code, notes, and snippets.

View kaustavdm's full-sized avatar

Kaustav Das Modak kaustavdm

View GitHub Profile
@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
/**
* @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 / 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;
}
@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 / 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 / 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 / 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 / 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))