Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Jenkins stevejenkins

View GitHub Profile
@claylo
claylo / cf-invalidate.php
Created Jun 5, 2011
How to invalidate items in AWS CloudFront
View cf-invalidate.php
<?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
@stevejenkins
stevejenkins / cf-invalidate.php
Created Sep 7, 2011 — forked from claylo/cf-invalidate.php
How to invalidate a single item via URL in AWS CloudFront
View cf-invalidate.php
<?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
@syamilmj
syamilmj / gist:2952342
Created Jun 19, 2012
Fix pagination error on homepage WP3.4
View gist:2952342
//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 ) );
@michaelv
michaelv / facebook-mass-delete-group-members.js
Created Apr 21, 2014
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…
View facebook-mass-delete-group-members.js
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() {
@bryanklingner
bryanklingner / config.boot
Last active Jan 14, 2021
Google Fiber with Ubiquiti EdgeRouter PoE config.boot
View 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"
View vacation-light-directorERS.groovy
This is not the latest source
See: https://github.com/imnotbob/vacation-lighting-director