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 | |
/*************************************************************** | |
* Function media_custom_validation | |
* Check the media form for duplicate inputs on the same day | |
***************************************************************/ | |
add_filter('gform_validation', 'media_custom_validation'); | |
function media_custom_validation($validation_result) { |
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
/* | |
Arduino UNO reads rising edge trigger pulses on pin 2 and displays counter on | |
Sparkfun SerLCD LCD-10097 | |
Photo of setup: http://ompldr.org/vZGNlbA/photo.JPG | |
Pariksheet <p.nanda@andor.com> Mar 2012 | |
*/ | |
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
:: ###### BACK-UP JOB ###### | |
@ECHO OFF | |
:: Set the constants | |
SET BACKUP_DIR=C:\path\to\_backup | |
SET TEMP_DIR=%BACKUP_DIR%\TEMP | |
SET TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2% | |
SET ARCHIVE_DIR=%BACKUP_DIR%\%TODAY% | |
SET WWWROOT_NAME="ProjectName" | |
SET WWWROOT_SOURCE=C:\path\to\wwwroot |
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 | |
/** | |
* | |
* The MQTTClient class allows you to connect to an MQTT message broker and publish messages | |
* @author rob.s.smart@gmail.com | |
* | |
* Example use | |
* $client = new MQTTClient("robphptest","realtime.ngi.ibm.com",1883); | |
* $client->connect(); |
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
var directionsService = new google.maps.DirectionsService(); | |
var request = { | |
origin : 'Melbourne VIC', // a city, full address, landmark etc | |
destination : 'Sydney NSW', | |
travelMode : google.maps.DirectionsTravelMode.DRIVING | |
}; | |
directionsService.route(request, function(response, status) { | |
if ( status == google.maps.DirectionsStatus.OK ) { |
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( $, plugin ) { | |
"use strict"; | |
// Working with promises to bubble event later than core. | |
$.when( someObjectWithEvents ).done( function() { | |
console.log( 'AJAX request done.' ); | |
} ) | |
.then( function() { | |
setTimeout( function() { | |
console.log( 'AJAX requests resolved.' ); |
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 limit_file_upload_size( $validation_result ) { | |
$form = $validation_result['form']; | |
foreach( $form['fields'] as &$field ){ | |
// NOTE: Add a custom CSS class to your image upload field and grab onto it here... | |
if( strpos( $field['cssClass'], 'choose-file' ) === false ) | |
continue; | |
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
<!-- | |
GRAVIY FORMS NOTES: | |
1. Create a “radio” group on any form | |
2. In the “appearance" tab, give the custom css class `js-gf-rating-stars` | |
3. The radio values should be in order from low -> high (1,2,3,4,5,etc…). | |
4. You can have as many stars as you want, it’s based off the number of radio elements in the group. | |
5. You could technically have as many groups of ratings stars as you want. | |
JS CONFIG: |
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 | |
/** | |
* LDAP PHP Change Password Webpage (modified for Active Directory) | |
* @author: Matt Rude <http://mattrude.com> | |
* @author: Isaiah Olson <http://www.olsontech.io/> | |
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/ | |
* | |
* | |
* GNU GENERAL PUBLIC LICENSE |
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
<html> | |
<head> | |
<!-- include Synology SSO js --> | |
<script src="http://ds:5000/webman/sso/synoSSO-1.0.0.js"></script> | |
</head> | |
<body> | |
<script> | |
/** Display login/logout button. |
OlderNewer