Skip to content

Instantly share code, notes, and snippets.

View nbeers22's full-sized avatar

Nathan Beers nbeers22

  • Jacksonville Beach, FL
View GitHub Profile
@nbeers22
nbeers22 / remove-meta-wordpress.php
Last active July 3, 2023 23:10
Remove all the extra bloat of meta tags that WordPress adds to the <head> and disables the JSON API
<?php
// remove some meta tags from WordPress
remove_action('wp_head', 'wp_generator');
function remove_dns_prefetch( $hints, $relation_type ) {
if ( 'dns-prefetch' === $relation_type ) {
return array_diff( wp_dependencies_unique_hosts(), $hints );
}
return $hints;
}
@nbeers22
nbeers22 / 0_reuse_code.js
Last active August 29, 2015 14:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nbeers22
nbeers22 / carousel-loop.php
Last active February 10, 2020 22:08
Bootstrap carousel with WordPress loop
@nbeers22
nbeers22 / Pig-latin_solution.rb
Last active August 29, 2015 14:06
Solution for Pig-latin
# Solution for Challenge: Pig-latin. Started 2014-09-16T15:13:49+00:00
# Script: CONVERT TO PIG LATIN
# Iteration One: CONVERT SINGLE WORD
# GET a word from user input.
# IF the word starts with a vowel, don't change it.
# ELSE replace the word with its pig latin equivalent.
# GET all of the consonants before the first vowel in the word.