Skip to content

Instantly share code, notes, and snippets.

View nowsathns's full-sized avatar

Mohamed Nowshath nowsathns

View GitHub Profile
@nowsathns
nowsathns / dlAttachments.py
Created November 2, 2016 07:52 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
@nowsathns
nowsathns / EFExtensions.cs
Created October 17, 2016 12:15 — forked from ondravondra/EFExtensions.cs
C# extension for executing upsert (MERGE SQL command) in EF with MSSQL
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace EFExtensions