Skip to content

Instantly share code, notes, and snippets.

View peterson-umoke's full-sized avatar
🏠
Working from home, Freelancer, Software Engineer

Peterson Umoke peterson-umoke

🏠
Working from home, Freelancer, Software Engineer
View GitHub Profile
@peterson-umoke
peterson-umoke / deploy.php
Created June 19, 2021 18:47 — forked from oxguy3/deploy.php
Script used to automatically deploy from GitHub to a cPanel shared hosting server
<?php
/**
* deploy.php by Hayden Schiff (oxguy3)
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9
*
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal.
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms.
*/
// random string of characters; must match the "Secret" defined in your GitHub webhook
@peterson-umoke
peterson-umoke / .htaccess
Created June 23, 2022 23:30
Clean .php from any php file
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]