Skip to content

Instantly share code, notes, and snippets.

View ccurtin's full-sized avatar
🤙
makka thangs

Christopher James Curtin ccurtin

🤙
makka thangs
View GitHub Profile
@ccurtin
ccurtin / Preferences.sublime-settings
Created November 17, 2014 03:31
:SUBLIME: :SETTINGS: exclude files and folders from search
{
"file_exclude_patterns":
[
"*.sass-cache",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
@ccurtin
ccurtin / xcopy-robocopy.md
Last active August 29, 2015 14:10
COPY source->destination
XCOPY X:\path\source\*.* X:\path\to\destination /D/S/H/V/C/F/K/Y
robocopy ./path/to/src/ ./path/to/dest/ -E

Robocopy Syntax

ROBOCOPY source destination [file [file]…] [options]

@ccurtin
ccurtin / :PAYPAL: sample-discount-quantity-checkout
Created November 21, 2014 23:35
:PAYPAL: sample-discount-quantity-checkout
https://www.sandbox.paypal.com/cgi-bin/webscr?business=info@hairubuild.com&cmd=_xclick&amount=10&shipping=0&discount_num=10&discount_rate=10&discount_rate2=10&quantity=10
@ccurtin
ccurtin / element-view-header.css
Last active August 29, 2015 14:13
Use jQuery to detect if an element in screen or not then apply/remove classes that have transitions to animate elements.
.masthead {
background: none;
background: #FFF;
border-bottom: 3px solid #EEE;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
overflow: hidden;
@ccurtin
ccurtin / .bash-profile color PS1 settings
Last active August 29, 2015 14:13
.bash-profile settings
export PS1='\e[1;32m\w\e[1;32m >'
export PS1="[\[\033[32m\]\w]\[\033[0m\]\$(__git_ps1)\n\[\033[1;36m\]\u\[\033[32m\]$ \[\033[0m\]"
==========================
@ccurtin
ccurtin / : WORDPRESS : custom action hook.php
Created January 18, 2015 00:37
:WORDPRESS: custom action hook
<?php
/*
*------------------------------
* CREATING A CUSTOM ACTION HOOK
*------------------------------
/*
1. Create a custom action hook to load functions into
----------------------------------------------------*/
function wp_after_html() {
@ccurtin
ccurtin / Cropped and centered image featured image.scss
Created February 2, 2015 15:27
Cropped and centered image featured image
@ccurtin
ccurtin / Strip shortcode tags but keep the inner contents of it.php
Created February 2, 2015 20:37
Strip shortcode tags but keep the inner contents of it
<?php
function clean_content()
{
$the_content = get_the_content();
$the_content = preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $the_content);
return $the_content;
}
?>
@ccurtin
ccurtin / htaccess-force-www
Created March 9, 2015 22:54
.hraccess force WWW
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
@ccurtin
ccurtin / dynamically generate taxonomy terms as sanitized CSS clases.php
Created March 19, 2015 01:22
Create dynamically generated and sanitized CSS classes as a list from a taxonomy's terms in Wordpress
<?php
/*
* Create dynamically generated and sanitized CSS classes as a list from a taxonomy's terms
* Example: <a class="<?php echo taxonmy_terms_as_css_list('Geographical Locations'); ?>"
*
*/
function taxonmy_terms_as_css_list($term_name) {
// get the taxonomy terms