Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# pam_notify.py
# Author : Jeeyoung Kim
# Python script to notify user on login
FROM_ADDRESS = 'admin@example.com'
TO_ADDRESS = 'you@example.com'
def pam_sm_open_session(pamh, flags, args):
try:
from email.mime.text import MIMEText
@jeeyoungk
jeeyoungk / venn.html
Created March 19, 2012 16:15
Venn Diagram Experiment
<!doctype html>
<html>
<head>
<title>Venn diagram of order 4</title>
</head>
<body>
<div>Venn Diagram Experiment</div>
<div>Use the controls on the bottom left.</div>
<div id='canvas'></div>
<script src='https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael.js'></script>
@jeeyoungk
jeeyoungk / gist:1032899
Created June 18, 2011 07:39
Convoluted way to check for balanced parenthesis.
# Author : Jeeyoung Kim
# Convoluted way to check for balanced parenthesis.
L = lambda f: lambda x : f(x + 1)
R = lambda f: lambda x : not x or f(x - 1)
D = {'(':'L', ')':'R'}
while True:
print 'please input sequence of parenthesises, like ()()((, or ((())())'
input = raw_input()