Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a 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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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
DELETE FROM iwp_history WHERE siteID NOT IN ( SELECT siteID FROM iwp_sites ); | |
DELETE FROM iwp_history_additional_data WHERE historyID NOT IN ( SELECT historyID FROM iwp_history ); | |
DELETE FROM iwp_history_raw_details WHERE historyID NOT IN ( SELECT historyID FROM iwp_history ); | |
DELETE FROM iwp_site_stats WHERE siteID NOT IN ( SELECT siteID FROM iwp_sites ); | |
DELETE FROM iwp_user_access WHERE siteID NOT IN ( SELECT siteID FROM iwp_sites ); |
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 prefix_get_the_terms( $terms, $post_id, $taxonomy ) { | |
if ( 'category' == $taxonomy ) { | |
if ( is_category() ) { | |
$current = get_queried_object(); | |
$sub_terms = get_terms( $taxonomy, array( | |
'child_of' => $current->term_id, | |
'fields' => 'ids', |
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 | |
/** | |
* Plugin Name: MLP Autosync Terms | |
* Description: Automatically sync all linked terms when a post is saved | |
* Author: Biont | |
* Author URI: https://github.com/Biont | |
* License: GPLv3 | |
*/ | |
/** |
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 zip = new JSZip(); | |
var count = 0; | |
var zipFilename = "zipFilename.zip"; | |
var urls = [ | |
'http://image-url-1', | |
'http://image-url-2', | |
'http://image-url-3' | |
]; | |
urls.forEach(function(url){ |
mkdir ~/Mirror
cd ~/Mirror
httrack --connection-per-second=8 --sockets=8 --keep-alive --display --verbose --advanced-progressinfo --disable-security-limits -i -s0 -m -F 'Mozilla/5.0 (X11;U; Linux i686; en-GB; rv:1.9.1) Gecko/20090624 Ubuntu/9.04 (jaunty) Firefox/3.5' -#L999999 http://domain.com
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 | |
trait JsonSerialize | |
{ | |
function jsonSerialize() | |
{ | |
$reflect = new ReflectionClass($this); | |
$props = $reflect->getProperties(ReflectionProperty::IS_STATIC | ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_PRIVATE); | |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
This issue is noted here: https://deliciousbrains.com/wp-migrate-db-pro/doc/ssl-errors/
Original reference for this fix is from: http://stackoverflow.com/questions/26461966/osx-10-10-curl-post-to-https-url-gives-sslread-error/26538127#26538127
php -i | grep "SSL Version"
OlderNewer