Skip to content

Instantly share code, notes, and snippets.

View maxking's full-sized avatar
:octocat:

Abhilash Raj maxking

:octocat:
View GitHub Profile
@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=
@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 / 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?

#!/usr/bin/env python3
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.headerregistry import Address
# Create the base text message.
msg = MIMEMultipart('related')
#!/usr/bin/env python3
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.headerregistry import Address
# Create the base text message.
msg = MIMEMultipart('related')
# !/bin/sh
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
# contact me at admin@mattparnell.com
# Special thanks to Travis/travisn000 from the PCLinux Forums for making improvements that allow
# for more complex apt-get commands. See the thread: http://www.pclinuxos.com/forum/index.php/topic,66385.0.html
# Use this just like apt-get for faster package downloading. Make sure to have axel installed.
@maxking
maxking / cb-exit
Last active August 29, 2015 14:06 — forked from lanrat/cb-exit
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import os
import getpass
class cb_exit:
def disable_buttons(self):
@maxking
maxking / plsync.sh
Last active August 29, 2015 14:13 — forked from mkaito/plsync.sh
#!/usr/bin/env zsh
# Takes all my playlists from ~/.mpd/playlists, fixes them up, and creates a
# folder for each, along with the music they reference.
# The sync stage requires an sshd server to run on your phone, as well as the rsync executable.
# - http://linux.wxs.ro/2011/08/05/rsync-your-android/
MPD_MUSIC_ROOT="${HOME}/Music" # Root of your MPD library
MPD_PLAYLIST_ROOT="${HOME}/.mpd/playlists" # MPD playlist folder
@maxking
maxking / indiabix.py
Last active August 29, 2015 14:17
Given URL of the first page of a category from Indiabix.com, downloads all the questions with answers.
"""
This script downloads all the questions from Indiabix.com from the url of a given category.
It can easily be customized (if you know basic python) to download all the questions from
all the categories. It also downloads their answers.
Author: Abhilash Raj <raj.abhilash1@gmail.com>
Date: 17th March 2015
Copyright (c) 2015 Abhilash Raj <Abhilash Raj>
@maxking
maxking / screen-switch
Created September 20, 2015 23:26
This is a script to auto-enable/disable an external display. I bind it to the screen-switch button used in windows and it works like a charm.
#!/usr/bin/env bash
xrandr | grep VGA | grep -w connected >/dev/null
echo $?
if [[ "$?" -lt 1 ]]
then
notify-send "Extending desktop to VGA screen"
xrandr --output LVDS1 --auto --output VGA1 --auto --left-of LVDS1 --primary
else
xrandr --output LVDS1 --auto --primary