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
@KustomDeveloper
KustomDeveloper / Unbounce + Pardot Iframe Embed
Last active January 25, 2018 19:08
Allows me to set any query value in the pages query string then rebuild the iframe and set value for hidden fields
<noscript>
<iframe src="YOUR_IFRAME_URL" scrolling="no" type="text/html" frameborder="0" allowTransparency="true" style="width:300px;height:100%;overflow:hidden;border: 0"></iframe>
</noscript>
<script type="text/javascript">
// Add / Update a key-value pair in the URL query parameters
function updateUrlParameter(uri, key, value) {
// remove the hash part before operating on the uri
var i = uri.indexOf('#');
@KustomDeveloper
KustomDeveloper / Clickfunnels - Add terms of service box
Created February 2, 2018 20:00
Clickfunnels - Add terms of service box on landing page. Won't show submit button until checked
//Put in your button id and add this to a custom html/js object on your page
<div class="checkbox">
<label><span id="clicker"><input type="checkbox" name="custom_type" data-custom-type="agree" value="agree_tc"></span> I have read and agree to the terms and conditions of this website</label>
</div>
<script type="text/javascript">
$(document).ready(function() {
<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
<script>
$(document).ready(function(){
$(".order2stepbuttonOrder").hide();
$("#bump-offer").click(function() {
$(".order2stepbuttonOrder").toggle();
});
});
</script>
class TweetsController < ApplicationController
# GET /tweets
def index
@tweets = Tweet.all
end
# GET /tweets/1
def show
@tweet = Tweet.find(params[:id])
@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
@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
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 / 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