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 | |
//add your server aliases here | |
$servers = array( | |
"185.14.184.234" => "mcfly.bensmann.no", | |
"185.14.184.xxx" => "another.server.com", | |
); | |
//this script is triggered by this command from the terminal or cron: | |
//echo "time=`uptime`&df=`df -h`" | curl -s -d @- http://domain.com/path/to/script.php |
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 | |
add_filter( 'wp_get_attachment_url', function( $url, $id ){ | |
if( is_ssl() ) | |
$url = str_replace( 'http://', 'https://', $url ); | |
return $url; | |
}); |
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
// … find all gist scripts inside the ajax container | |
var $gists = $ajax_container.find('script[src^="https://gist.github.com/"]'); | |
// if gist embeds are found | |
if( $gists.length ){ | |
// update each gist | |
$gists.each(function(){ | |
// we need to store $this for the callback |
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 add_stylesheet_once( url ){ | |
$head = $('head'); | |
if( $head.find('link[rel="stylesheet"][href="'+url+'"]').length < 1 ) | |
$head.append('<link rel="stylesheet" href="'+ url +'" type="text/css" />'); | |
} |
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
document.addEventListener("DOMContentLoaded", function(event) { | |
var ak_js = document.getElementById( 'ak_js' ); | |
if( !ak_js ){ | |
ak_js = document.createElement( 'input' ); | |
ak_js.type = 'hidden'; | |
ak_js.name = ak_js.id = 'ak_js'; | |
} | |
else { | |
ak_js.parentNode.removeChild( ak_js ); |
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
WebFontConfig = { | |
google: { families: [ 'PT+Sans:400,400italic:latin', 'Ubuntu:300,400,500:latin' ] } | |
}; | |
var cb = function() { | |
var wf = document.createElement('script'); | |
wf.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | |
wf.type = 'text/javascript'; | |
wf.async = 'true'; | |
var s = document.getElementsByTagName('script')[0]; |
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
# Please confirm that you want to reset the MySQL passwords | |
CONFIRM="n" | |
echo -n "Please confirm MySQL password reset. Continue? (y/N): " | |
read -n 1 CONFIRM_INPUT | |
if [ -n "$CONFIRM_INPUT" ]; then | |
CONFIRM=$CONFIRM_INPUT | |
fi | |
echo |
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
sub vcl_hash { | |
# … Other vcl_hash stuff | |
# If this is a HTTPS request, keep it in a different cache | |
if (req.http.X-Forwarded-Proto) { | |
hash_data(req.http.X-Forwarded-Proto); | |
} |
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 gulp = require('gulp'), | |
filter = require('gulp-filter'), | |
changed = require('gulp-changed'), | |
imagemin = require('gulp-imagemin') | |
var paths = { | |
images: './source/img/**/*' | |
}; | |
// Process images |
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 | |
add_filter( 'gform_tabindex', '__return_false' ); |
OlderNewer