Skip to content

Instantly share code, notes, and snippets.

View stevejenkins's full-sized avatar

Steve Jenkins stevejenkins

View GitHub Profile
@syamilmj
syamilmj / gist:2952342
Created June 19, 2012 04:51
Fix pagination error on homepage WP3.4
//Fix for home page navigation error on WP 3.4
function aq_query_for_homepage( $query ) {
global $paged;
if(get_option('lp_include_reviews') == "true") { $include_reviews = "reviews"; }
if(get_option('lp_include_videos') == "true") { $include_videos = "videos"; }
if(get_option('lp_include_screenshots') == "true") { $include_screenshots = "screenshots"; }
if( $query->is_main_query() && $query->is_home() ) {
$query->set( 'post_type', array( 'post', $include_reviews, $include_videos, $include_screenshots ) );
This is not the latest source
See: https://github.com/imnotbob/vacation-lighting-director
@stevejenkins
stevejenkins / cf-invalidate.php
Created September 7, 2011 04:31 — forked from claylo/cf-invalidate.php
How to invalidate a single item via URL in AWS CloudFront
<?php
/**
* Super-simple AWS CloudFront Invalidation Script
* Modified by Steve Jenkins <steve stevejenkins com> to invalidate a single file via URL.
*
* Steps:
* 1. Set your AWS Access Key
* 2. Set your AWS Secret Key
* 3. Set your CloudFront Distribution ID (or pass one via the URL with &dist)
* 4. Put cf-invalidate.php in a web accessible and password protected directory
@bryanklingner
bryanklingner / config.boot
Last active January 14, 2021 01:49
Google Fiber with Ubiquiti EdgeRouter PoE config.boot
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to Internal"
@claylo
claylo / cf-invalidate.php
Created June 5, 2011 17:09
How to invalidate items in AWS CloudFront
<?php
/**
* Super-simple AWS CloudFront Invalidation Script
*
* Steps:
* 1. Set your AWS access_key
* 2. Set your AWS secret_key
* 3. Set your CloudFront Distribution ID
* 4. Define the batch of paths to invalidate
* 5. Run it on the command-line with: php cf-invalidate.php
@michaelv
michaelv / facebook-mass-delete-group-members.js
Created April 21, 2014 15:00
This javascript removes all users from a facebook group. It works with the new facebook layout. Paste this in the javascript console. Script tested in Firefox. Known issues: 1. when facebook responds slowly, the script might experience hickups.. 2. occasionially, the error 'this user is not a member of the group' pops up.. IMPORTANT: add your ow…
var deleteAllGroupMembers = (function () {
var deleteAllGroupMembers = {};
// the facebook ids of the users that will not be removed.
// IMPORTANT: add your own facebook id here so that the script will not remove yourself!
var excludedFbIds = ['1234','11223344']; // make sure each id is a string!
var usersToDeleteQueue = [];
var scriptEnabled = false;
var processing = false;
deleteAllGroupMembers.start = function() {