Skip to content

Instantly share code, notes, and snippets.

View anantshri's full-sized avatar
🇮🇳
Working on the next Jugaad

Anant Shrivastava anantshri

🇮🇳
Working on the next Jugaad
View GitHub Profile
add_filter( 'preprocess_comment', 'nyt_preprocess_comment' );
function nyt_preprocess_comment($comment) {
if ( strlen( $comment['comment_content'] ) > 5000 ) {
wp_die('Comment is too long.');
}
return $comment;
}
@tomatohater
tomatohater / vimdeck2pptx.py
Last active May 23, 2016 14:57
My dorky colleague created a presentation using vimdeck. The very last thing he would want to see is it as a real PowerPoint deck. So here you go...
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
from cStringIO import StringIO
from argparse import ArgumentParser
from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE