Skip to content

Instantly share code, notes, and snippets.

View mattyza's full-sized avatar
Focused

Matty Cohen mattyza

Focused
View GitHub Profile
@evansolomon
evansolomon / gist:3481592
Created August 26, 2012 16:47
Bash functions to find WordPress hooks
# Alias ST2's command line tool for a shorter (easier-to-remember) name
alias st="/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl"
# Search for and open WordPress hooks
function action() {
ack "do_action\(\s*('|\")$1('|\")" | awk {'print $1'} | sed 's/:$//g' | xargs st
}
function filter() {
ack "apply_filters\(\s*('|\")$1('|\")" | awk {'print $1'} | sed 's/:$//g' | xargs st
}
@johnpbloch
johnpbloch / README.md
Created August 23, 2012 13:55
A bash script to make .pot files for WordPress plugins

Installation

To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"

@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin