Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Abhilash Raj maxking

:octocat:
View GitHub Profile
View email-examples.py
#!/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')
View email-examples2.py
#!/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')
View apt-fast
# !/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.
View 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):
View 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 Aug 29, 2015
Given URL of the first page of a category from Indiabix.com, downloads all the questions with answers.
View indiabix.py
"""
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 Sep 20, 2015
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.
View screen-switch
#!/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
@maxking
maxking / email
Created Jan 7, 2012
coe of an HTML email
View 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 Apr 9, 2012
Apache conf for django
View gist:2341564
#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
View mailman_proposal.md

##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?