Skip to content

Instantly share code, notes, and snippets.

View gsvster's full-sized avatar

Svyatoslav gsvster

  • Ukraine, Ternopil'
View GitHub Profile
@mdunham
mdunham / Delete-Facebook-Messages.js
Last active May 18, 2017 18:28
Easier way to delete all your Facebook messages at once.
/**
* Auto Delete All Facebook Messages
*
* You can run this code from the console, but the best way to run it is by
* saving it as bookmark in your bookmark bar. Look at the gists comments for
* instructions on how to save it as a bookmark.
*
* @link http://matthewdunham.net
* @link http://linkedin.com/in/matthewdunham
* @author Matthew Dunham <[email protected]>
from restoran.models import *
from django.contrib import admin
class DishIngredientInline(admin.StackedInline):
model = Dish.ingredients.through
extra = 1
def formfield_for_foreignkey(self, db_field, request=None, **kwargs):
field = super(DishIngredientInline, self).formfield_for_foreignkey(db_field, request, **kwargs)
@Rathgore
Rathgore / delete_old_mail.py
Created May 4, 2012 21:00
Simple script to delete old messages in an IMAP mailbox
MAIL_SERVER = ''
USERNAME = ''
PASSWORD = ''
MAILBOX = 'Spam'
MAX_DAYS = 7 # Deletes messages older than a week
import imaplib
import datetime
today = datetime.date.today()