Skip to content

Instantly share code, notes, and snippets.

View thinkryan's full-sized avatar

Ryan Dennler thinkryan

  • Centro
  • San José, Costa Rica
View GitHub Profile
@christopherdebeer
christopherdebeer / Regex patterns
Created July 27, 2010 09:53
Some useful entity RegEx patterns
Some useful entity RegEx patterns
by Christopher de Beer
27 July 2010
They're not perfect,
i'll keep fixing up the leaks as I go. (next... adding lookarounds)
He'll, I'll ,She'd etc : ([a-zA-Z]+['’][a-z]{1,3})
@adamjspooner
adamjspooner / _config.yml
Created May 24, 2011 06:08
A Jekyll plugin to convert .styl to .css.
stylus:
compress: true
path: ./path/to/styl
@jonathonbyrdziak
jonathonbyrdziak / taxmeta.class.php
Created February 22, 2012 18:17
Taxonomy Metaboxes, allows you to create additional taxonomy metas, including images.
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage RedRokk Library
* @copyright Copyright (C) 2011+ Redrokk Interactive Media
*
* @version 2.0
*/
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@zpea
zpea / html5_video_conv.bash
Created July 21, 2012 03:00
little shell script to convert video files to the various HTML5 video formats/codecs using ffmpeg. Also generates the line for embedding the video using the videoJS plugin for wordpress.
#!/bin/bash
#
# video conversion script for publishing as HTML 5 video, via videojs (with hd button extension)
# 2011 by zpea
# feel free to use as public domain / Creative Commons CC0 1.0 (http://creativecommons.org/publicdomain/zero/1.0/)
#
FFMPEG=/usr/bin/ffmpeg
HD_SUFFIX='_hd'
anonymous
anonymous / index.slim
Created September 11, 2012 22:48
Playing with an icon-based radial control; next step is to add some interactivity and make it spin!
div.bevel
a.center l
div.bezel
ul.dial
li#a a
li#b c
li#c e
li#d j
li#e m
@fulippo
fulippo / gist:3986307
Created October 31, 2012 10:26
Query to remove orphaned taxonomy terms from a WordPress DB
-- Replace %s with table prefix
DELETE tr
FROM %s_term_relationships tr
INNER JOIN %s_term_taxonomy tt
ON (tr.term_taxonomy_id = tt.term_taxonomy_id)
WHERE tt.taxonomy != 'link_category'
AND tr.object_id NOT IN (SELECT ID FROM %s_posts);
@franz-josef-kaiser
franz-josef-kaiser / ajax.js
Last active May 31, 2022 15:53
AJAX in WordPress. Class based example.
( function( $, plugin ) {
"use strict";
// Working with promises to bubble event later than core.
$.when( someObjectWithEvents ).done( function() {
console.log( 'AJAX request done.' );
} )
.then( function() {
setTimeout( function() {
console.log( 'AJAX requests resolved.' );