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
{ | |
"Version":"2008-10-17", | |
"Id":"http referer policy example", | |
"Statement":[ | |
{ | |
"Sid":"Allow get requests referred by www.mysite.com and mysite.com", | |
"Effect":"Allow", | |
"Principal":"*", | |
"Action":"s3:GetObject", | |
"Resource":"arn:aws:s3:::YOUR_S3_BUCKET_NAME/*", |
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 | |
$facebook = new Facebook(array( | |
'appId' => 'YOUR_API_KEY', | |
'secret' => 'YOUR_API_SECRET', | |
'cookie' => true, | |
)); | |
$fql = "SELECT page_id, name from page where name='Coke'"; |
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 | |
require("postmark.php"); | |
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address"); | |
$result = $postmark->to("reciver@example.com") | |
->subject("Email Subject") | |
->plain_message("This is a plain text message.") | |
->attachment('File.pdf', $file_as_string, 'application/pdf') |
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
# Download and install xCode to install make. | |
# http://itunes.apple.com/us/app/xcode/id448457090?mt=12 | |
# Don't forget to run "/Applications/Install Xcode.app" | |
# Open up your terminal, and follow the steps below | |
# by cutting pasting or typing the below in. | |
# The number sign indicates a comment. | |
# Make a temporary directory | |
mkdir temp |
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
######################################## | |
# Adjust Memory/Post/Execution/ Upload Size | |
######################################## | |
php_value max_execution_time 3600 | |
php_value upload_max_filesize 100M | |
php_value post_max_size 220M | |
php_value memory_limit 256M | |
######################################## | |
# Display Errors: (Comment out for no Errors) |
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
How to Use | |
Step 1. | |
Copy the custom_widget.php file and place it in your WordPress theme folder. Assuming WordPress is installed in the root of your server the file will be place in /wp-content/themes/yourtheme/ | |
Step 2. | |
Open up functions.php and include the following piece of code somewhere in the file. include TEMPLATEPATH . '/custom_widget.php'; | |
Step 3. | |
Edit the custom_widget.php file to suit your needs. |
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 | |
/* | |
Setup and add our custom post types | |
*/ | |
function create_post_types(){ | |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
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 # -*- coding: utf-8 -*- | |
declare ( encoding = 'UTF-8' ); | |
/** | |
* Plugin Name: T5 All URIs | |
* Description: Creates a plaintext list of all URIs on your blog. | |
* Version: 2012.03.08 | |
* Required: 3.3 | |
* Author: Thomas Scholz <info@toscho.de> | |
* Author URI: http://toscho.de | |
* License: MIT |
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).ready(function() { | |
/* Hide all elements outside the visible window */ | |
$('body *').each( function(){ | |
var top_of_object = $(this).position().top; | |
var bottom_of_window = $(window).scrollTop() + $(window).height(); | |
if( bottom_of_window < top_of_object ){ | |