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
# for files only | |
find ./ -type f -exec chmod 644 {} + | |
# for directories only | |
find ./ -type d -exec chmod 755 {} + |
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 | |
# ============================================================================== | |
# Set up LAMP stack on blank Linode | |
# | |
# $ nano install.sh | |
# Copy/paste this script into terminal. Save and exit. | |
# $ chmod 775 install.sh | |
# $ ./install.sh | |
# $ rm install.sh | |
# ============================================================================== |
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
$ nano /etc/apache2/apache2.conf | |
<IfModule mpm_prefork_module> | |
StartServers 2 | |
MinSpareServers 6 | |
MaxSpareServers 12 | |
MaxClients 30 | |
MaxRequestsPerChild 3000 | |
</IfModule> |
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
function the_excerpt_imagelink($content) | |
{ | |
global $post; | |
if(is_home() && strpos($content, 'more-link')){ | |
// Remove all links from images | |
$content = preg_replace(array('{<a(.*?)(wp-att|wp-content\/uploads)[^>]*><img}','{ wp-image-[0-9]*" /></a>}'), array('<img','" />'), $content); | |
// Add link to post around images. | |
$content = eregi_replace('(<img [^>]*>)', '<a href="' . get_permalink() . '" rel="bookmark" class="imagelink" title="Permanent Link to ' . $post->post_title . '">' . '\1</a>', $content); |
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
// Image in more goes to blog post | |
function the_excerpt_imagelink($content) | |
{ | |
global $post; | |
// See if the tag exists | |
$pos=strpos($post->post_content, '<!--more'); | |
// If on the home page, and the tag exists... change the link! | |
if(is_home() && $pos){ |
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 | |
require '../tmhOAuth.php'; | |
require '../tmhUtilities.php'; | |
$tmhOAuth = new tmhOAuth(array( | |
'consumer_key' => 'YOUR_CONSUMER_KEY', | |
'consumer_secret' => 'YOUR_CONSUMER_SECRET', | |
'user_token' => 'A_USER_TOKEN', | |
'user_secret' => 'A_USER_SECRET', | |
)); | |
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
require 'spec_helper' | |
describe Product do | |
before do | |
@product = Product.new( | |
name: "Super Duper Necklace", | |
description: "Brazilian agate necklace with solid brass beads and a lobster clasp fastening. due to the organic nature of agate, each necklace is unique. please expect slight variations from those pictured.", | |
price: 19.99 | |
) | |
end |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/data"> | |
<div class="content"> | |
<xsl:apply-templates select="single/entry"/> | |
</div> | |
</xsl:template> | |
<xsl:template match="single/entry"> |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<data> | |
<params/> | |
<events /> | |
<single> | |
<pagination total-entries="1" total-pages="1" entries-per-page="1" current-page="1" /> | |
<section id="1" handle="articles">Articles</section> | |
<section id="4" handle="pages">Pages</section> | |
<entry id="10" section-handle="pages"> | |
<title handle="resources">Resources</title> |
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
/** | |
* Drafts Manager Window | |
*/ | |
HomepageCMS.window.DraftsManager = function(config) { | |
config = config || {}; | |
// Load module information etc | |
this.loadData(); | |
// Create window |