Skip to content

Instantly share code, notes, and snippets.

wpsmith / font-mimetypes
Last active April 25, 2024 00:44 — forked from localpcguy/font-mimetypes
Mime Types for .htaccess or web.config
.eot - application/
.woff - application/font-woff
.ttf - application/x-font-truetype
.svg - image/svg+xml
.otf - application/x-font-opentype
IIS (Web.Config)
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/" />
<remove fileExtension=".ttf" />
wpsmith / PHP composer
Created February 27, 2019 23:55 — forked from davebarnwell/PHP composer
Global installation of PHP tools with Composer

Global installation of PHP tools with Composer

To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:

$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
wpsmith / category.php
Last active February 24, 2019 17:13 — forked from billerickson/template-gallery.php
Custom Genesis Category Template with Pagination
* Custom Category Template
* @package my_child_theme
* @since 1.0.0
* @author Travis Smith <>
* @copyright Copyright (c) 2013, Travis Smith
* @license GNU Public License
* @link
wpsmith / fieldset.css
Last active October 11, 2018 18:46 — forked from paranoiq/aaa.txt
CSS: Cross-browser styling of <fieldset> and <legend> without any additional HTML elements
Cross-browser styling of <fieldset> and <legend> without any additional HTML elements
basic rules:
- fieldset cannot have padding, because it would ruin the legend absolute positioning in Gecko
- cannot use relative positioning on legend, because it does not work in Opera
- legend cannot have padding, because it would break its 100% size in all browsers.
this cannot be fixed by overflow:hidden, because it is stupid in all IE
- selector priority in IE7 is wrong (!important)
wpsmith / composer.json
Created December 14, 2016 15:08 — forked from mAAdhaTTah/composer.json
CMB2 as Composer Library
"require": {
"php": ">=5.3.0",
"composer/installers": "v1.0.12",
"webdevstudios/cmb2": "dev-master",
"autoload": {
"files": ["vendor/cmb2/init.php"]
"extra": {
wpsmith /
Created November 5, 2016 19:52 — forked from lorenzocaum/
Setup Kicksend's Mailcheck with Event Espresso 4's registration checkout page #optimization

This sample coding will add Mailcheck from Kicksend to your registration checkout page. It is helpful for preventing spelling errors in email addresses.

Step 1 - Setup Mailcheck resources

Download the Kicksend Mailcheck JavaScript file from here:

Then upload the mailcheck.min.js file to your WordPress site. You can add it to this location using an SFTP or FTP client like FileZilla, Cyberduck, or Transmit:

wpsmith / Makefile
Created September 9, 2016 15:18 — forked from border/Makefile
json example in golang
include $(GOROOT)/src/
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
$(GOFMT) -w jsontest.go
wpsmith /
Created September 8, 2016 16:02 — forked from mmueller/
Command-line URL generator (Python)
#!/usr/bin/env python
# Copyright 2009 Empeeric LTD. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
wpsmith / gulpfile.js
Created September 7, 2016 12:36 — forked from mackensen/gulpfile.js
This is an example gulpfile for managing a WordPress theme with a custom (non-LESS) CSS stylesheet. It includes tools for bumping the version and updating the version references.
// List of modules used.
var gulp = require('gulp'),
bump = require('gulp-bump'), // Generates new version.
argv = require('yargs')
.default('release', 'patch')
.argv, // CLI parser.
fs = require('fs'), // Used by bump.
semver = require('semver'), // Used by bump.
git = require('gulp-git'), // Git wrapper.
jshint = require('gulp-jshint'), // Lints JS.
wpsmith /
Created July 5, 2016 21:17 — forked from Micka33/
cassandra on mac OSX

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL"