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 -ev | |
yum install wget | |
wget https://openlitespeed.org/packages/openlitespeed-1.6.21.src.tgz | |
yum install tar | |
tar -zxvf openlitespeed-1.6.21.src.tgz | |
cd openlitespeed-1.6.21 | |
./build.sh | |
./install.sh |
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
Barba.Dispatcher.on('newPageReady', function(currentStatus, oldStatus, container, newPageRawHTML) { | |
// html head parser borrowed from jquery pjax | |
var $newPageHead = $( '<head />' ).html( | |
$.parseHTML( | |
newPageRawHTML.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0] | |
, document | |
, true | |
) | |
); | |
var headTags = [ |
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 csv = []; | |
$( '.sortingGroups .groupForFunnel' ).each(function() { | |
csv.push( $( this ).find( '.title' ).html() + "\n"); | |
$( this ).find( '.groupFunnels .pageListingItem' ).each(function() { | |
csv.push( [ | |
$( this ).find( '.pageListingTitle a' ).html(), | |
$( this ).find( '.pageListingTitle a' ).attr( 'href '), | |
$( this ).find( '.funnelStatSmall' ).text() | |
].join( "\t" ) + "\n" ); | |
}); |
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 html = []; | |
jQuery( 'tr.active:not(.plugin-update-tr)' ).each(function() { | |
html.push([ | |
'-' | |
, jQuery( this ).find( 'td.plugin-title > strong' ).html() | |
, jQuery( this ).find( '.plugin-version-author-uri' ).text().split( '|' )[ 0 ] | |
].join(' ')); | |
}); | |
console.log( html.join( "\n" ) ); |
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 | |
<div class="entry-content"> | |
echo markdown( get_the_content() ); | |
</div> | |
<div class="entry-extra"> | |
echo markdown( get_field( 'my_custom_field' ) ); | |
</div> | |
?> |
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
require_once get_template_directory() . '/inc/php-markdown-1.8.0/Michelf/Markdown.inc.php'; | |
use MichelfMarkdown; | |
function markdown( $str ) { | |
return Markdown::defaultTransform( $str ); | |
} | |
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
git init | |
git remote add origin git@github.com:USER/REPOSITORY.git | |
git pull origin master |
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 | |
# Source: https://www.conetix.com.au/support/article/simple-php-mail-test | |
# Howto: ssh login, then php test-email.php | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
$from = "emailtest@YOURDOMAIN"; | |
$to = "YOUREMAILADDRESS"; | |
$subject = "PHP Mail Test script"; | |
$message = "This is a test to check the PHP Mail functionality"; | |
$headers = "From:" . $from; |
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_upload_mimes($mimes=array()) { | |
$mimes['kml']='application/vnd.google-earth.kml+xml'; | |
$mimes['kmz']='application/vnd.google-earth.kmz'; | |
return $mimes; | |
} | |
add_filter("upload_mimes","add_upload_mimes"); |
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
delay 0.05 | |
tell application "Coda 2" to activate | |
tell application "System Events" | |
keystroke "p" using {command down, control down} | |
end tell |
NewerOlder