Skip to content

Instantly share code, notes, and snippets.

View atvKumar's full-sized avatar

Kumaran atvKumar

View GitHub Profile
#target photoshop
// $.level = 2;
/*
* Script by Tomek Cejner (tomek (at) japko dot info)
* based on work of Damien van Holten:
* http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/
*
* My version adds support of nested layer groups,
* and exports single layers in addition to groups.
@atvKumar
atvKumar / Check_Internet.py
Created April 17, 2014 03:10
Checks if internet connection is on.
import socket
def check_net(address='google.com', debug=False):
"""
Checks if internet connection to address given is valid and working
Defaults to using 'google.com' in an event nothing is passed
Returns : True if resolved and False if not resolved
"""
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
@atvKumar
atvKumar / redisPubSub_wxChat.py
Created April 3, 2014 11:43
A simple Chat Program using redis Pub/Sub
from threading import Thread
# from redisutils import redis_connect
import redis
import wx
###########################################################################
## Class Listener
###########################################################################
@atvKumar
atvKumar / sendemail.py
Last active August 29, 2015 13:57
Send Email with Attachments
from smtplib import SMTP
from smtplib import SMTPException
from mimetypes import guess_type
from os.path import basename
from email.utils import COMMASPACE
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email.encoders import encode_base64
@atvKumar
atvKumar / sendGmail
Created March 6, 2014 06:10
Simple Send Text Email from Python using Gmail
from smtplib import SMTPException
from email.utils import COMMASPACE
import smtplib
_default_address = ['[email protected]']
def SendGmail(subject, body, to_addresses=_default_address,
from_address='[email protected]', debug=False):
email_header = "From: My Server <[email protected]>\n" \