Skip to content

Instantly share code, notes, and snippets.

View retgef's full-sized avatar

Brian Fegter retgef

View GitHub Profile
@kgorskowski
kgorskowski / create_deployment.sh
Last active October 31, 2018 22:45
recreate latest successful codedeploy deployment. needs awscli, jq and corresponding iam permissions
#!/bin/bash
#your variables here, you can set AWS credentials here as well
AWS_REGION=$YourAWSRegion
DEP_GROUP=$NameOfYourCodeDeployDeploymentGroup
APP_NAME=$NameOfYourCDApplication
# list successfull deployments only
STATUS=Succeeded
@JustThomas
JustThomas / wordpress-multisite-internal-redirect-loop.md
Last active March 27, 2024 14:45
WordPress Multisite: How to fix error "too many redirects"

WordPress Multisite: How to fix error "Request exceeded the limit of 10 internal redirects"

I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

The problem was, in my case, one specific rewrite rule in the .htaccess file.

Problem description

@cgarvey
cgarvey / pwd.php
Last active September 22, 2021 09:40
Utility PHP file to use WordPress' password utility to generate a hashed (and salted) version of a typed password. Why? So you can easily generate passwords for use in MySQL scripts / SQL command line, like resetting passwords or adding new users.
<?php
/*
Author
======
Author: Cathal Garvey.
Website: http://cgarvey.ie/
Help/Details Page: http://cgarvey.ie/blog/archive/2013/01/23/manually-generating-salted-hashed-wordpress-passwords/
Copyright
@mbijon
mbijon / wordpress-plugin-api.php
Created November 2, 2011 00:38
WordPress plugin API sample-use
<?php
/*
Retrieve items from the WordPress.org plugin API
Original source: http://pastebin.com/7Ji8rD2P
Docs v1.0: http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/
Usage:
http://{host}/wordpress-plugin-api.php?page_start=9&per=20&pages=10&info=1
GET['page_start'] => Page-numer to start retreiving data on
@hakre
hakre / endpoint-example.php
Created November 18, 2010 20:20
Wordpress Rewrite Endpoint Example
<?php
/**
* Author Endpoints Example
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.