Skip to content

Instantly share code, notes, and snippets.

@wpsmith
wpsmith / PHP composer tools.md
Created February 27, 2019 23:55 — forked from davebarnwell/PHP composer tools.md
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
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
wpsmith / new_gist_file.md
Created November 5, 2016 19:52 — forked from lorenzocaum/new_gist_file.md
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:

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 September 9, 2016 15:18 — forked from border/Makefile
json example in golang
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 September 8, 2016 16:02 — forked from mmueller/bitly.py
Command-line bit.ly 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@wpsmith
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
wpsmith / install.md
Created July 5, 2016 21:17 — forked from Micka33/install.md
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 https://raw.github.com/Homebrew/homebrew/go/install)"
@wpsmith
wpsmith / installing_cassandra.md
Created July 5, 2016 21:17 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X

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 / perform-basic-bid-management.js
Created June 4, 2016 01:22 — forked from daniel-c05/perform-basic-bid-management.js
AdWords Scripts - Perform Basic Bid Management
var workingDateRange = "LAST_14_DAYS";
function main() {
lowerBidsToTopKeywords();
raiseBidsToMidPositionKeywords();
raiseBidsToLowPositionKeywords();
}