Skip to content

Instantly share code, notes, and snippets.

Joe di Stefano joeydi

Block or report user

Report or block joeydi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
joeydi /
Created Sep 24, 2019
Craft CMS post-receive hook
while read oldrev newrev ref
# only checking out the master (or whatever branch you would like to deploy)
if [ "$ref" = "refs/heads/$BRANCH" ];
joeydi /
Created Oct 20, 2018
Download WordPress, Create Database, and Install - Requires WP CLI
# Download WordPress, create database, configure, and install
if [ $1 ]
echo "Installing in directory $1"
mkdir $1
cd $1
joeydi /
Created Jun 10, 2016
Form/FormSet cleaned_data handling
if isinstance(cleaned_data, list):
cleaned_data = [self.process_cleaned_data(form_data) for form_data in cleaned_data]
cleaned_data = self.process_cleaned_data(cleaned_data)
joeydi /
Created Nov 19, 2014
Simple WordPress Content Scraper/Importer
import os
import lxml.html
import urllib
import BeautifulSoup
from pprint import pprint
from wordpress_xmlrpc import Client, WordPressPage
from wordpress_xmlrpc.methods.posts import GetPosts, NewPost
from wordpress_xmlrpc.methods.users import GetUserInfo
View Example Open Graph Tags
<meta property="og:type" content="article" />
<meta property="og:title" content="Web Design & Development from Burlington, VT - Okay Plus" />
<meta property="og:description" content="Critical thinking, clean code and responsive design. These are the tools I use to bring digital experiences to life online." />
<meta property="og:url" content="" />
<meta property="og:site_name" content="Okay Plus" />
joeydi / functions.php
Last active Nov 15, 2017
WordPress SEO Open Graph Image Size Filter
View functions.php
function my_opengraph_image_size() {
return 'large';
add_filter( 'wpseo_opengraph_image_size', 'my_opengraph_image_size', 10, 1 );
joeydi / skrollr-video.js
Created Sep 25, 2014
Attempt to play video frame by frame with scroll. Don't try this at home, kids.
View skrollr-video.js
videos.each(function () {
var video = $(this).get(0);
video.addEventListener('loadedmetadata', function () {
render: function(data) {
from threading import Thread
import requests ## pip install requests
import time
import smtplib
## email sending function
def email_sender(input_message, email_to, client):
''' function to send email '''
to = email_to
gmail_user = '' ## email of sender account
View vpr-composer
initComposer = function() {
if (window.XMLHttpRequest) {
httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
catch (e) {
try {
httpRequest = new activeXObject("Microsoft.XMLHTTP");
joeydi / fpf-suggestions
Created Aug 19, 2014
Front Porch Forum Suggestions
View fpf-suggestions
- Even when logged in, the homepage shows the signup form. This would be much more useful if it showed the current issue.
- On the current issue on mobile, there is 3 full screens of navigation cruft before you get to the first post.
- Fix broken layouts on mobile.
- Ability to attach pictures or other media to posts.
- Ability to reply to a post.
- Ability to see replies to a post.
- Fewer posts about cats ;)
You can’t perform that action at this time.