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 | |
echo '<pre>'; | |
for ($j = 1; $j < 10; $j++) { | |
for ($k = 0; $k < $j; $k++) { | |
echo "\n\$i % $j == $k: \n"; | |
for ($i = 0; $i < 10; $i++) { | |
echo "$i : "; | |
if ($i % $j == $k) { | |
echo "TRUE"; |
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
/** | |
* Scan Gravity Forms uploads with ClamAV | |
* Based on 'Custom Scan AV function by Kris Chase' | |
* https://krischase.com/detect-and-prevent-malware-in-gravity-forms-file-upload-with-php-clamav/ | |
* Requires clamav and php-clamav installed and enabled | |
*/ | |
function myfunc_uploads_clamav( $validation_result ) { | |
if ( $_FILES ) { | |
$form = $validation_result['form']; |
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
/** | |
* add_flagging_link_comment - Add report link to comment content | |
* | |
* Add report link to comment content | |
* | |
* @since 1.0 | |
* | |
* @param string $comment_text | |
* @param object $comment | |
* |
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 | |
/** | |
* Clone of wp_count_comments from WP4.2. | |
*/ | |
function myblogs_count_comments( $post_id = 0 ) { | |
global $wpdb; | |
$post_id = (int) $post_id; | |
/** | |
* Filter the comments count for a given 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
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Do you need to setup new MySQL database? (y/n)" | |
read -e setupmysql | |
if [ "$setupmysql" == y ] ; then | |
echo "MySQL Admin User: " | |
read -e mysqluser |
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
/* | |
Offsets from https://raw.githubusercontent.com/tilomitra/pure/d7f85e37abec3fdab14a541305ad05783159655c/src/grids/css/grids-offsets.css | |
Media queries from Pure v0.5.0 | |
Copyright 2014 Yahoo! Inc. All rights reserved. | |
Licensed under the BSD License. | |
https://github.com/yui/pure/blob/master/LICENSE.md | |
*/ | |
@media screen and (min-width: 35.5em) { | |
.offset-sm-0 { | |
margin-left:0; |
NewerOlder