Skip to content

Instantly share code, notes, and snippets.

View tallcoder's full-sized avatar

Duane Helton tallcoder

View GitHub Profile
@tallcoder
tallcoder / rsync.sh
Created January 2, 2015 20:47
Rsync terminal command
# Create .bash_functions file
# Include that from .bashrc or .bash_profile
function rsync_copy() {
# 1 = host
# 2 = source file/dir
# 3 = destination file/dir
rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress $2 $1:$3
}
@tallcoder
tallcoder / nsuserdefaults_remove
Last active December 5, 2017 14:30
delete all stored nsuserdefaults data
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
@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
@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

<?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">
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"
# 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).
#
# 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
@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.
*
@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;
}