Skip to content

Instantly share code, notes, and snippets.

View ericrasch's full-sized avatar

Eric Rasch ericrasch

View GitHub Profile
@ericrasch
ericrasch / good PR desc.md
Created July 8, 2015 14:06
Helpful GitHub PR descriptions

Please write a short description of what the PR entails for project. Also, please remember to begin your PR as soon as you create a branch and make your first commit. This allows others to see what's actually being worked on and what the latest updates are (especially if a project has a lot of existing branches).

REF:

  • {{insert any Basecamp or other links that are relevant to the project here}}

TODO

@ericrasch
ericrasch / gulp errors fixed.md
Last active August 29, 2015 14:22
NPM + Gulp.js errors (npm ERR + throw err + libsass) have been resolved...

When running npm update I was getting this error: npm ERR! cb() never called!

This answer on StackOverflow helped solve that issue:

So here's the fix for that. These steps are from David Walsh's blog

  1. Clear your npm cache: sudo npm cache clean -f
  2. Install the latest version of the Node helper: npm install -g n
  3. Tell the helper (n) to install the latest stable version of Node: sudo n stable
@ericrasch
ericrasch / 0_Bulletproof PHP Paths.php
Last active August 22, 2021 05:18
Different ways to find paths via PHP
<?php
/**
* Defined paths for local/production vs. staging servers
* example: http://website.com/main-folder/sub-folder/paths.php
* $full_uri: http://website.com/main-folder/sub-folder/paths.php
*/
$full_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$path = dirname($_SERVER[PHP_SELF]);
$current_path = substr( $path, strrpos($path,'/') + 1 );
@ericrasch
ericrasch / WP recommended PHP settings.md
Created April 24, 2015 17:04
Recommended PHP settings for WordPress
@ericrasch
ericrasch / WP Security README.md
Last active December 5, 2024 14:36
Hardening & Improving WordPress Security
@ericrasch
ericrasch / disable-xml-rpc.php
Created April 10, 2015 18:46
Disable XML-RPC + Pingback WordPress Plugin
<?php
/*
Plugin Name: Disable XML-RPC + Pingback
Plugin URI: http://www.philerb.com/wp-plugins/
Description: This plugin disables XML-RPC API + pingbacks in WordPress 3.5+, which is enabled by default. 2 WP plugins were combined together to cover all bases.
Version: 1.0.0
Author: Eric Rasch
Author URI: http://ericrasch.com
License: GPLv2
*/
@ericrasch
ericrasch / Gemfile
Created February 2, 2015 22:02
Generic Gemfile to add in a web project root.
source 'https://rubygems.org'
gem 'capistrano', '~> 2.15'
gem 'capistrano-ext', '~> 1.2.1'
gem 'colored', '~> 1.2'
@ericrasch
ericrasch / 00 OS X app list.md
Last active July 4, 2017 03:53
List of useful Mac apps I use daily + profiles for my home directory.

Mac OS X App List

Productivity Tools

  • Alfred Powerpack Powerpack is a set of incredibly powerful features for Alfred
  • Alfred Boosts your efficiency with hotkeys, keywords, text expansion and more
  • AppCleaner Drag-n-drop app uninstall
  • Caffeine keeps your Mac from going to sleep
  • Default Folder X Finder save location helper
  • Fantastical Menubar calendar app w/ natural language
  • GPG Suite secure communication and encrypting files

Sublime Text Preferences

My personal settings for Sublime Text (Mac). Heavily borrowed from Wes Bos: https://gist.github.com/wesbos/a3b12cfda064a906ac04

To set the key bindings below, goto Sublime Text menu -> Preferences -> Key Bindings - User, paste the settings from below and save that file.

To set the user preferences below, type ⌘, in Sublime Text to bring up the Preferences.sublime-settings file, paste the settings from below and save that file.

Installed Packages

Setup OSX 10.9 with a Clean Install

After two years of tinkering my machine is a bit all over. With Mavericks I wanted to start fresh

1. Run Software Update

Make sure everything is up to date.

Software Update