Skip to content

Instantly share code, notes, and snippets.

@thilinapiy
thilinapiy / screenoff.sh
Created Oct 13, 2013
This script will lock the screen and turn the display in to standby mode (switch off the screen). Tested on ubuntu 13.04 and will work on gnome environment.
View screenoff.sh
#!/bin/bash
# This script will lock the screen and turn the
# display in to standby mode (switch off the screen).
#
# Thilina Piyasundara
# 2013-08-31
# last updated on : 2013-10-13
# lock the gnome screen
@thilinapiy
thilinapiy / my_send_mail.py
Created Jun 15, 2012
My Python e-mail script
View my_send_mail.py
#!/usr/bin/python
import smtplib
import getpass
import base64
import os
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.MIMEBase import MIMEBase