Skip to content

Instantly share code, notes, and snippets.

Travis Smith wpsmith

Block or report user

Report or block wpsmith

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
@wpsmith
wpsmith / PHP composer tools.md
Created Feb 27, 2019 — forked from davebarnwell/PHP composer tools.md
Global installation of PHP tools with Composer
View PHP composer tools.md

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
wpsmith / category.php
Last active Feb 24, 2019 — forked from billerickson/template-gallery.php
Custom Genesis Category Template with Pagination
View category.php
<?php
/**
* Custom Category Template
*
* @package my_child_theme
* @since 1.0.0
* @author Travis Smith <t@wpsmith.net>
* @copyright Copyright (c) 2013, Travis Smith
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @link https://gist.github.com/wpsmith/5062834
@wpsmith
wpsmith / fieldset.css
Last active Oct 11, 2018 — forked from paranoiq/aaa.txt
CSS: Cross-browser styling of <fieldset> and <legend> without any additional HTML elements
View fieldset.css
/*
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
wpsmith / composer.json
Created Dec 14, 2016 — forked from mAAdhaTTah/composer.json
CMB2 as Composer Library
View composer.json
{
"require": {
"php": ">=5.3.0",
"composer/installers": "v1.0.12",
"webdevstudios/cmb2": "dev-master",
},
"autoload": {
"files": ["vendor/cmb2/init.php"]
},
"extra": {
@wpsmith
wpsmith / new_gist_file.md
Created Nov 5, 2016 — forked from lorenzocaum/new_gist_file.md
Setup Kicksend's Mailcheck with Event Espresso 4's registration checkout page #optimization
View new_gist_file.md

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:

https://raw.githubusercontent.com/mailcheck/mailcheck/d25dc9a119ca844bb35b1baf341cca0a634e4ac9/src/mailcheck.min.js

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
wpsmith / Makefile
Created Sep 9, 2016 — forked from border/Makefile
json example in golang
View Makefile
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go
@wpsmith
wpsmith / bitly.py
Created Sep 8, 2016 — forked from mmueller/bitly.py
Command-line bit.ly URL generator (Python)
View bitly.py
#!/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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@wpsmith
wpsmith / gulpfile.js
Created Sep 7, 2016 — 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.
View gulpfile.js
// 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
wpsmith / install.md
Created Jul 5, 2016 — forked from Micka33/install.md
cassandra on mac OSX
View install.md

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 https://raw.github.com/Homebrew/homebrew/go/install)"
@wpsmith
wpsmith / installing_cassandra.md
Created Jul 5, 2016 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X
View installing_cassandra.md

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 https://raw.github.com/Homebrew/homebrew/go/install)"
You can’t perform that action at this time.