Skip to content

Instantly share code, notes, and snippets.

View maxking's full-sized avatar
:octocat:

Abhilash Raj maxking

:octocat:
View GitHub Profile
# To run this script first install the 'gitpython' package from pip.
# $ pip install gitpython
#
# Usage:
# python git_grep.py repo_path filename regex
#
import os
import sys
import subprocess
@maxking
maxking / intern_project_discussion.md
Last active September 12, 2016 21:46
Defense against privilege escalation attacks in Linux Kernel
window.addEventListener("load", function() { alert("hello!");});
@maxking
maxking / grub.cfg
Last active July 6, 2016 20:06
Grub.cfg to load ikgt module in grub.
# CoreOS grub oem config to add coreos-ikgt support to the grub config of the OS.
# The ikgt_pkg.bin shoudl already be inside /boot/coreos and this file should be
# placed inside /dev/sda6 which is by default mounted at /usr/share/oem/ in coreos
# production build.
#
# **Note**:
# Please read the comments in the file below before using the configuration. It might
# cause temporarily to wreck your system otherwise.
set default='coreos-ikgt'
@maxking
maxking / get_files.py
Last active April 17, 2016 10:04
Download files of a particular type from a webpage.
#! /usr/bin/env python3
"""
Author: Abhilash Raj <raj.abhilash1@gmail.com>
This script is used to download all the files of a particular type linked on a
web page. This probably can be accomplished easily by some other tools as well,
but I wrote this to download some assignments of my own.
Usage: python get_files.py -p <address_of_web_page> -f <filtype>
@maxking
maxking / server.c
Last active March 17, 2016 10:07
simple echo server demonstration
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
void dostuff(int);
void error(char *msg)
{
perror(msg);
@maxking
maxking / emacs-email-setup.md
Created December 26, 2015 08:16 — forked from areina/emacs-email-setup.md
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@maxking
maxking / mailman_proposal.md
Last active December 16, 2015 15:19
GSOC Proposal

##Introduction To consider the problem of signing and email-encryption using pgp/smime we must consider a few things first:

  • What is the main purpose to sign/encrypt the email messages on a list?
  • How are we going to implement this feature? Which kind of digital signature, which standards, which kind of encryption will be used for this purpose?
  • What possibly could go wrong with the system? What problems may arise as a result of this feature for the list managers/users?

I will try to answer these questions in best possible way in my proposal.

##Need for such feature?

@maxking
maxking / gist:2341564
Created April 9, 2012 05:05
Apache conf for django
#apache conf
SGIScriptAlias / /home/abhilash/Documents/django/wiki/apache/django.wsgi
WSGIPythonPath /home/abhilash/Documents/django/wiki
<Directory /home/abhilash/Documents/django/wiki >
Order deny,allow
Allow from all
Options +ExecCGI
@maxking
maxking / email
Created January 7, 2012 19:03
coe of an HTML email
<font size=3D"4"><span style=3D"background-color:rgb(255,153,102);font-fami=
ly:comic sans ms,sans-serif">Another Day<img style=3D"margin:0pt 0.2ex;vert=
ical-align:middle" src=3D"e/000" height=3D"22" width=3D"22">, another Month=
, another Ye<span></span>ar,</span><br style=3D"font-family:comic sans ms,s=
ans-serif">
<span style=3D"font-family:comic sans ms,sans-serif">=A0 =A0 =A0 =A0 =A0 =
=A0</span><span style=3D"color:rgb(51,255,51);background-color:rgb(0,153,0)=
;font-family:comic sans ms,sans-serif">another Smile<img style=3D"margin:0p=
t 0.2ex;vertical-align:middle" src=3D"e/360" height=3D"26" width=3D"21">, a=