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
# Put this somehwere in .bashrc/aliases/etc. | |
# OpenSSL must be installed -- these are just aliases. | |
alias enc='openssl enc -e -aes-256-cbc -salt ' | |
alias dec='openssl enc -d -aes-256-cbc ' |
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
//Cross browser CSS3 mixins | |
@mixin box-shadow($left, $top, $radius, $color) { | |
box-shadow: $left $top $radius $color; | |
-webkit-box-shadow: $left $top $radius $color; | |
-moz-box-shadow: $left $top $radius $color; | |
} | |
@mixin transition($property, $duration, $easing: linear) { | |
transition: $property $duration $easing; |
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 | |
/** | |
* Duplicate this file as many times as you would like, just be sure to change the | |
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com | |
* | |
* Plugin Name: Empty Widget | |
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs. | |
* Author: RedRokk Interactive Media | |
* Version: 1.0.0 | |
* Author URI: http://www.redrokk.com |
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: Custom-Post-Type Base | |
Plugin URI: http://pmg.co/ | |
Description: Dynamically change your custom post type slugs | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: GPL2/Creative Commons | |
*/ |
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 array_mesh() { | |
// Combine multiple associative arrays and sum the values for any common keys | |
// The function can accept any number of arrays as arguments | |
// The values must be numeric or the summed value will be 0 | |
// Get the number of arguments being passed | |
$numargs = func_num_args(); | |
// Save the arguments to an array |
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 | |
/** | |
* This file handles redirecting of our templates to our given views | |
* dir and anything else. | |
* | |
* Check if the themer has made a theme file in their | |
* theme dir, if not load our default. | |
* | |
* @uses template_redirect http://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect | |
*/ |
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
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
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: Custom-Post-Type Base | |
Plugin URI: http://pmg.co/ | |
Description: Dynamically change your custom post type slugs | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: GPL2/Creative Commons | |
*/ |
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
/***** | |
* Basic display of gallery attachments | |
* When displaying your images via the [gallery] shortcode, WordPress will display image-links for each image in the gallery. Each of these image-links points to the image-gallery page for that particular image. The image gallery is created by the image.php template if present in your theme files. Here is a basic way to display your gallery images from within the image-gallery loop: | |
*****/ | |
<a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image($post->ID, 'medium'); ?></a> | |
/***** | |
* Display the URL of the latest image attachment | |
* Perhaps the most useful template tag for displaying image-attachment information is wp_get_attachment_url(). This function returns a full URI for an attachment file. If no attachment is found, a value of false is returned. Here are several ways to use this tag within the loop: |
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
// Use: ><a href="list.html" class="js-back">Go back</a> | |
$('.js-back').on('click', function(evt) { | |
if (document.referrer != "") { | |
evt.preventDefault(); | |
history.back(); | |
} | |
}); |
OlderNewer