This file contains hidden or 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
/** | |
* ACF Form: Prevent default form submit | |
*/ | |
jQuery(document).on('submit', '.acf-form', function(e) { | |
e.preventDefault(); | |
}); | |
/** | |
* ACF Form: Init | |
*/ |
This file contains hidden or 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 | |
/* | |
* Display posts only from today and in the future: | |
* http://old.support.advancedcustomfields.com/discussion/6000/how-to-sort-posts-by-acf-date-and-display-only-future-posts | |
* by Pasnon | |
*/ | |
$date_args = array( | |
'post_type' => 'events', |
This file contains hidden or 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
// ---------------------------------------------------- | |
// Adding the placeholders in textfields of login form | |
// ---------------------------------------------------- | |
jQuery(document).ready(function($) { | |
$('#loginform input[type="text"]').attr('placeholder', 'Username'); | |
$('#loginform input[type="password"]').attr('placeholder', 'Password'); | |
This file contains hidden or 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
@ECHO OFF | |
ipconfig /all | findstr "Servers" | findstr "xx.xx.xx.xx" | |
if %ERRORLEVEL% equ 0 ( | |
rem echo Findstr FOUND xx.xx.xx.xx in the DNS list. | |
goto google | |
) else ( | |
rem echo Findstr DID NOT find xx.xx.xx.xx in the DNS list. | |
goto local | |
) |
This file contains hidden or 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
@echo off | |
::需要设置的网络,一般为“本地连接”或者“无线网络连接” | |
set name="无线网络连接" | |
::请根据您的参数修改以下数据 | |
::设置 IP地址 | |
set ipaddress=18.1.16.169 | |
::设置 子掩码 | |
set mask=255.255.252.0 | |
::设置 网关 | |
set gateway=18.1.19.254 |
This file contains hidden or 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 | |
class WP_HTML_Compression | |
{ | |
// Settings | |
protected $compress_css = true; | |
protected $compress_js = true; | |
protected $info_comment = true; | |
protected $remove_comments = true; | |
// Variables |
This file contains hidden or 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
location ~* "(eval\()" { deny all; } | |
location ~* "(127\.0\.0\.1)" { deny all; } | |
location ~* "([a-z0-9]{2000})" { deny all; } | |
location ~* "(javascript\:)(.*)(\;)" { deny all; } | |
location ~* "(base64_encode)(.*)(\()" { deny all; } | |
location ~* "(GLOBALS|REQUEST)(=|\[|%)" { deny all; } | |
location ~* "(<|%3C).*script.*(>|%3)" { deny all; } | |
location ~ "(\\|\.\.\.|\.\./|~|`|<|>|\|)" { deny all; } | |
location ~* "(boot\.ini|etc/passwd|self/environ)" { deny all; } | |
location ~* "(thumbs?(_editor|open)?|tim(thumb)?)\.php" { deny all; } |
This file contains hidden or 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 | |
# simple function to check http response code before downloading a remote file | |
# example usage: | |
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi | |
function validate_url(){ | |
if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then echo "true"; fi | |
} |
This file contains hidden or 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 | |
# simple function to check http response code before downloading a remote file | |
# example usage: | |
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi | |
function validate_url () { | |
if [[ `curl -s --head "$1" | head -n 1 | grep "HTTP/[1-3].[0-9] [23].."` ]] | |
then | |
# 0 = true |
This file contains hidden or 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 | |
# Simple function to check http response code before downloading a remote file | |
# Example usage: | |
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi | |
function validate_url () { | |
if [[ `curl -s --head "$1" | head -n 1 | grep "HTTP/[1-3].[0-9] [23].."` ]]; then echo "true"; fi | |
} |