Skip to content

Instantly share code, notes, and snippets.

@imjaypatel
imjaypatel / index.html
Last active August 29, 2015 14:04
Hide Show <p> tag in JQuery
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
@imjaypatel
imjaypatel / index.html
Created September 21, 2014 13:16
Simple HTML Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Document</title>
<style type="text/css">
h3 {
color: #FF22CC;
}
</style>
@imjaypatel
imjaypatel / index.py
Last active August 29, 2015 14:11
Calender Agenda Regexp
import re
def time_replace(timeword):
timestr = timeword.group().lower()
flag = None
if 'h' in timestr:
flag = 1
elif ':' in timestr:
flag = 2
elif 'm' in timestr:
@imjaypatel
imjaypatel / add.py
Last active August 29, 2015 14:21
Suspension not allowed here: IOError: encoder error -2 when writing image file
from PIL import ImageFile
ImageFile.MAXBLOCK = max(image.size) ** 2