Skip to content

Instantly share code, notes, and snippets.

@joemaller
joemaller / wpengine-boilerplate-gitignore-sorted
Created October 20, 2015 21:07
A sorted copy of the gitignore file from wpengine.com/git updated to a sorted copy of the gitignore file found in a default installation. (view the diff)
*.3gp
*.3gpp
*.asf
*.asx
*.avi
*.bak
*.bin
*.deb
*.dll
*.dmg
@VjWoo
VjWoo / th_shipping_options.php
Created February 23, 2015 14:52
Shipping Options plugin
<?php
/*
Plugin Name: TH Shipping Options
Plugin URI: NA
Description: TH Shipping Options plugin
Version: 1.0.0
Author: Vj
Author URI: www.wooforce.com
*/
body {
font: 100%/1.25 sans-serif;
color: #636363;
padding: 1em;
}
table {
width: 100%;
margin: 0;
border-top: 1px solid #e4e2e8;
@philippeowagner
philippeowagner / gist:6530635
Last active November 25, 2020 13:02
Having troubles with 'latin1_swedish_ci' on your MySQL Databases? Specially `OperationalError (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")`? No problem, fix it using Django's shell.This solution is based on this http://stackoverflow.com/questions/1073295/django-character-set-w…
from django.db import connection
from django.conf import settings
cursor = connection.cursor()
cursor.execute('SHOW TABLES')
results=[]
for row in cursor.fetchall():
results.append(row)
for row in results:
cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' % (row[0]))
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active April 17, 2024 12:35
Using Git with Subversion Mirroring for WordPress Plugin Development
@scribu
scribu / plugin-deploy.sh
Created August 4, 2011 12:18
Plugin deploy
#!/usr/bin/env bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/$DIR_NAME/$BRANCH
@atinypixel
atinypixel / issuu.php
Created December 20, 2010 22:13
Issuu API Client for PHP
<?php
/**
* IssuuClient hooks into Issuu's API
*
* example:
* include 'IssuuClient.php';
* $issuu = new IssuuClient(pubKey, privKey, apiAdr);
* $issuu->openAction('issuu.document.url_upload');
* $issuu->slurpUrl = 'pdfurl.pdf';
* $issuu->executeAction();