Skip to content

Instantly share code, notes, and snippets.

View tallcoder's full-sized avatar

Duane Helton tallcoder

View GitHub Profile
@tallcoder
tallcoder / debug.php
Created July 26, 2021 14:37
Debug Queries WordPress
// require('/debug.php');
<?php
if ( !defined('SAVEQUERIES') && isset($_GET['debug']) && $_GET['debug'] == 'sql' )
define('SAVEQUERIES', true);
if ( !function_exists('dump') ) :
/**
* dump()
*
@tallcoder
tallcoder / sync-sequel-pro-favorite.md
Created November 25, 2019 16:12 — forked from nguyenkims/sync-sequel-pro-favorite.md
Sync sequel pro favorites between macs

The sequel pro favorites can be shared between Macs using cloud storage service like Dropbox, Google Drive, OneDrive, etc.

The trick is to create a file that will be synced using these cloud services and sequel pro favorites file is just a symlink to this file.

The below script is used for OneDrive but it can also work for Dropbox and other cloud storages.

  1. Copy the current sequel pro favorites file

cp ~/Library/Application\ Support/Sequel\ Pro/Data/Favorites.plist ~/OneDrive/SequelPro.plist

@tallcoder
tallcoder / functions.php
Created November 22, 2019 19:27 — forked from WebEndevSnippets/functions.php
WooCommerce: Change Order Notes Placeholder Text
add_filter( 'woocommerce_checkout_fields', 'webendev_woocommerce_checkout_fields' );
/**
* Change Order Notes Placeholder Text - WooCommerce
*
*/
function webendev_woocommerce_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Your custom placeholder';
return $fields;
}
@tallcoder
tallcoder / edit-woocommerce-checkout-template.php
Created November 22, 2019 19:23 — forked from bekarice/edit-woocommerce-checkout-template.php
Add content and notices to the WooCommerce checkout - sample code
/**
* Each of these samples can be used - note that you should pick one rather than add them all.
*
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/
**/
/**
* Add a content block after all notices, such as the login and coupon notices.
*
# Based on bira theme
setopt prompt_subst
() {
local PR_USER PR_USER_OP PR_PROMPT PR_HOST
# Check the UID
if [[ $UID -ne 0 ]]; then # normal user
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
<?xml version="1.0"?>
<ruleset
name="Doctrine"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<description>The Doctrine coding standard.</description>
<!-- Import PSR-2 coding standard (base) -->
<rule ref="PSR2">
@tallcoder
tallcoder / dnsmasq OS X.md
Created May 11, 2018 14:19 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.

Requirements

Install

@tallcoder
tallcoder / workspace.sh
Created September 15, 2016 14:32 — forked from scottsb/casesafe.sh
Create and manage a case-sensitive disk-image on OSX.
#!/bin/bash
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
# where to store the sparse-image
WORKSPACE=${HOME}/.workspace.dmg.sparseimage
# location where workspace will be mounted