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
<div style="font-family: sans-serif;"> | |
<? var data = valid(); ?> | |
<form id="form" name="form"> | |
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?> | |
<? for (var i = 0; i < data.length; i++) { ?> | |
<? for (var j = 0; j < data[i].length; j++) { ?> | |
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br> | |
<? } ?> | |
<? } ?> | |
<? } else { ?> |
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
// javascript | |
$.expr[':'].internal = function (obj, index, meta, stack) { | |
// Prepare | |
var | |
$this = $(obj), | |
url = $this.attr('href') || '', | |
isInternalLink; | |
// Check link | |
isInternalLink = url.substring(0, rootUrl.length) === rootUrl || url.indexOf(':') === -1; |
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 | |
// cf http://tiffanybbrown.com/2013/02/03/wordpress-adding-custom-galleries-to-your-theme/ | |
remove_shortcode('gallery', 'gallery_shortcode'); | |
add_shortcode('gallery', 'custom_gallery'); | |
function custom_gallery($attr) { | |
$post = get_post(); |
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 | |
// cf http://stackoverflow.com/questions/14585538/customise-the-wordpress-gallery-html-layout | |
/****** REWRITE THE GALLERIE FUNCTION FROM WORDPRESS **********/ | |
add_shortcode('gallery', 'my_gallery_shortcode'); | |
function my_gallery_shortcode($attr) { | |
$counter=0; | |
//var_dump("Rewrite the shortcode gallery"); |
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
jQuery(document).ready(function($) { | |
// load touchdown resposnive nav | |
$('#site-navigation .menu').Touchdown(); | |
// check window size | |
if (matchMedia) { | |
var mq = window.matchMedia("(min-width: 769px)"); | |
mq.addListener(WidthChange); | |
WidthChange(mq); | |
} |
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 | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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
#ifdef CORDOVA_FRAMEWORK | |
#import <Cordova/CDVViewController.h> | |
#else | |
#import "CDVViewController.h" | |
#endif | |
@interface MainViewController : CDVViewController | |
@property (nonatomic, readwrite, retain) UIImageView *splashView; |
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 | |
/** | |
* imageColor | |
* | |
* Shows three methods to find the 'average' image color. | |
* | |
* Each function expects a gd image object. | |
* | |
* imageColor::averageResize($image) resizing to 1px, and checking the color. | |
* imageColor::averageBorder($image) find the average color of all border pixels. |