Skip to content

Instantly share code, notes, and snippets.

View ericrasch's full-sized avatar

Eric Rasch ericrasch

View GitHub Profile
@ericrasch
ericrasch / WP Disable Comments.md
Last active February 13, 2018 17:29
If you need to completely shut off all comments/trackbacks/pingbacks in the WordPress Admin

To shut off all comments/trackbacks/pingbacks in the WordPress Admin, the steps for cleanup are:

@ericrasch
ericrasch / Set Custom WP Feeds.php
Last active July 4, 2017 03:53
Add this code to your Theme's functions.php file.
<?php
/* =BEGIN: Remove WP generated junk from head
Source: http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/
---------------------------------------------------------------------------------------------------- */
function removeHeadLinks() {
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'feed_links_extra', 3 );

Proper HTML Formatting

Just wanted a simple resource for referencing the proper way to correctly format HTML code.

A Pen by Eric Rasch on CodePen.

License.

@ericrasch
ericrasch / SassMeister-input-HTML.html
Created July 18, 2014 16:34
Generated by SassMeister.com.
<section id="scrollNav-1" class="scroll-nav__section">
<h2>
Title with no class
</h2>
<div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.</p>
</div>
<hr>
</section>
@ericrasch
ericrasch / 0_reuse_code.js
Created August 6, 2014 14:16
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
@ericrasch
ericrasch / HTML5 Keyboard Input Types.js
Created August 28, 2014 15:10
HTML5 Input Types for Touch Keyboards
$('<input type="email" id="lead_email_alt" name="lead[email]" required="required" placeholder="E-mail Address" class=" form field text _lead_email ">').insertAfter('input#lead_email');
$('input#lead_email').remove();
$('<input type="tel" id="lead_phone_alt" name="lead[phone]" required="required" placeholder="Phone Number" class=" form field text phone _lead_phone ">').insertAfter('input#lead_phone');
$('input#lead_phone').remove();
$('<input type="text" autocorrect="off" id="lead_address_alt" name="lead[address]" required="required" placeholder="Street Address" class=" form field text _lead_address ">').insertAfter('input#lead_address');
$('input#lead_address').remove();
$('<input type="number" pattern="\d*" id="lead_zipCode_alt" name="lead[zipCode]" required="required" placeholder="Zip Code" class=" form field text _lead_zipCode ">').insertAfter('input#lead_zipCode');
@ericrasch
ericrasch / gulpfile.js
Last active August 29, 2015 14:08
gulpfile for chugging gulp
(function () {
'use strict';
var gulp = require('gulp');
var glob = require('glob');
var del = require('del');
var $ = require('gulp-load-plugins')();
var pkg = require('./package.json');
@ericrasch
ericrasch / reduce-repo-bloat.md
Last active August 29, 2015 14:10
Reduce Git/GitHub repo bloat size...

The following is what worked for me the best and easiest when trying to reduce the size of a GitHub repo. Download bfg.jar from this site: http://rtyley.github.io/bfg-repo-cleaner/ (discovered here: http://stackoverflow.com/a/15771042) Rename bfg.#####.jar to bfg.jar and put it in your root /github repo folder. Run the following commands:

git clone --mirror git@github.com:CMN/YourRepoName.com.git
ditto YourRepoName.com.git YourRepoName.com.backup.git
java -jar bfg.jar --strip-biggest-blobs 500 YourRepoName.com.git
cd YourRepoName.com.git
git reflog expire --expire=now --all
@ericrasch
ericrasch / Detect WordPress template file.php
Created December 3, 2014 18:31
Detect + display WordPress template file being used
<?php
/**
* Detect + display WordPress template file being used
* REF: http://www.wpmayor.com/output-name-of-wordpress-template-file-being-used/#comment-8221
*/
add_action('wp_head', 'show_template');
function show_template() {
global $template;
global $current_user;
@ericrasch
ericrasch / bedrock install.md
Last active March 8, 2016 01:13
Notes on getting Bedrock (https://github.com/roots/bedrock) installed on your Mac

make a copy of php.ini (you may not need this step)

sudo cp /private/etc/php.ini.default php.ini

install composer

curl -sS https://getcomposer.org/installer | php -d detect_unicode=Off

make composer available globally

sudo mv composer.phar /usr/local/bin/composer

upgrade PHP