This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Instrument Hooks for WordPress | |
Plugin URI: http://bueltge.de/ | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>. | |
Version: 0.0.1 | |
Author: Frank Bültge | |
Author URI: http://bueltge.de/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_avatar_from_service(service, userid, size) { | |
// this return the url that redirects to the according user image/avatar/profile picture | |
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
// everything else will go to the fallback | |
// google and gravatar scale the avatar to any site, others will guided to the next best version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 an open Sublime Text to a function definition | |
function fx() { | |
ack "function &?$1\(" | awk {'print $1'} | sed 's/:$//g' | xargs st | |
} | |
# Example usage from the root of a WordPress repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: T5 Log Queries | |
* Description: Writes all queries to '/query-log.sql'. | |
* Plugin URI: http://wordpress.stackexchange.com/a/70853/73 | |
* Version: 2012.11.04 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* Licence: MIT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# The MIT License (MIT) | |
# Copyright (c) 2013 Mark Jaquith | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A script that leverages Trac XML-RPC (I know, I know) to upload patches. | |
# | |
# This script is written specifically for the Mac, in that it reads from | |
# your keychain to derive your SVN password. You can change the SVN_PASS | |
# line below if you wanted to pull from ~/.svn/ or what not. | |
# | |
# Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345, | |
# using the name 12345.diff. If there exists a 12345.diff, the patch is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
allgits=`find ~/.cocoapods/CUSTOMERNAME ~/git/CUSTOMERNAME -name .git | sed 's_/.git__'` | |
filter=$* | |
filter="$filter --author=jerolimov" | |
filter="$filter --date=iso" | |
filter="$filter --after=2013-05-01" | |
filter="$filter --before=2013-05-31" | |
for i in $allgits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$(echo -en "\n\b") | |
# Ensure we are in a git repo with gitignore. | |
if [ ! -d .git ]; then echo "Current working directory is not a git repository."; exit -1; fi | |
#if [ ! -f .gitignore ]; then echo "Current working directory has no .gitignore file."; exit -2; fi | |
# Sort (by date) and save new files | |
for file in `git status --porcelain --untracked-files=all | grep -v '.log$' | grep '^?? ' | sed 's/^?? //g'` | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo xcodebuild -license | |
xcode-select --install # There will be a GUI prompt | |
sudo cpan SVN::Core # use the "sudo" method when prompted | |
# Then add this to your ~/.profile: | |
# export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH | |
# Then probably: | |
brew reinstall git | |
brew reinstall subversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What makes a good bug report: | |
* Steps to reproduce, with earliest step Shouldn’t need to know code | |
* Description of the bug. What you saw vs what you expected. | |
* Error messages or error codes. | |
* | |
* PHP errors- | |
* |
OlderNewer