Skip to content

Instantly share code, notes, and snippets.

View MrDHat's full-sized avatar
🍟

Akshay Katyal MrDHat

🍟
View GitHub Profile

Preferences

{
	"caret_style": "phase",
	"dictionary": "Packages/Language - English/en_US.dic",
	"draw_white_space": "selection",
	"font-size": 12.0,
	"highlight_line": true,
	"ignored_packages":
@MrDHat
MrDHat / random.py
Created March 1, 2014 19:38
Random Number Generator in Python
# imports for abstract classes
from abc import ABCMeta, abstractmethod
import time
''' ==============================================================================================
Seed Classes
==============================================================================================='''
class Seed(object):
"""Abstract class for seeds"""
// Your app's root module...
angular.module('MyModule', [], function($httpProvider)
{
// Use x-www-form-urlencoded Content-Type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
// Override $http service's default transformRequest
$httpProvider.defaults.transformRequest = [function(data)
{
/**
@MrDHat
MrDHat / .htaccess
Created March 15, 2014 13:54
.htaccess for AngularJS projects
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]
</ifModule>
var mongoose = require('mongoose');
var glob = require("glob");
var path = require('path');
mongoose.connect('mongodb://username:password@localhost/dbname');
/**
* We check if the connection is ok
@MrDHat
MrDHat / kerberos_setup.md
Created August 29, 2017 09:36 — forked from ashrithr/kerberos_setup.md
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in