Skip to content

Instantly share code, notes, and snippets.

Avatar
:bowtie:
I may be slow to respond.

Nick Worth Xtremefaith

:bowtie:
I may be slow to respond.
View GitHub Profile
@Xtremefaith
Xtremefaith / keybase.md
Created Sep 22, 2018
Public Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am xtremefaith on github.
  • I am xtremefaith (https://keybase.io/xtremefaith) on keybase.
  • I have a public key ASBR_ZZqD-C3oOI0dUQ0qIgTdT27xp7JiMzAY6ez4ZPhmwo

To claim this, I am signing this object:

@Xtremefaith
Xtremefaith / git.css
Created Mar 14, 2017 — forked from neilgee/git.css
Git Command Line Reference - Notes and reminders on set up and commands
View git.css
/*
* Set up your Git configuration
*/
git config --global user.email "you@yourdomain.com"
git config --global user.name "Your Name"
git config --global core.editor "nano"
@Xtremefaith
Xtremefaith / .bash_profile
Created Mar 14, 2017 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@Xtremefaith
Xtremefaith / div-framework_redirect-navigation-logo.php
Last active Oct 1, 2015
By default the Div Framework navigation logo links to the home page, but if you want to redirect it to a custom link you would add this filter in the functions.php of your child theme.
View div-framework_redirect-navigation-logo.php
/**
* REDIRECT NAVIGATION LOGO
* Used to redirect the navigation logo to a custom link
*/
add_filter( 'nav_logo', function($s){
$pattern = "/(?<=href=(\"|'))[^\"']+(?=(\"|'))/";
return preg_replace($pattern,$new_url,$s);
});
View Intro to Grunt.md
@Xtremefaith
Xtremefaith / Blank-Search.php
Last active Aug 29, 2015
Want to redirect a user who enters a blank search request, here is a snippet to help with that.
View Blank-Search.php
add_filter( 'request', 'my_request_filter' );
function my_request_filter( $query_vars ) {
if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) {
$query_vars['s'] = " ";
}
return $query_vars;
}
@Xtremefaith
Xtremefaith / git_aliases.md
Last active Jan 4, 2016
All kinds of helpful aliases and configuration options. Check them out!
View git_aliases.md

##Basics --st: status

git config --global alias.st status 

--ci: commit -m

git config --global alias.ci 'commit -m'

@Xtremefaith
Xtremefaith / Spawn SSH Agent
Created Dec 18, 2013
Start your SSH as soon as you open your terminal so you don't have to keep entering your passphrase throughout that session. Enter this at the bottom of your .bashrc file
View Spawn SSH Agent
SSH_ENV=$HOME/.ssh/environment
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV}
echo succeeded
chmod 600 ${SSH_ENV}
. ${SSH_ENV} > /dev/null
@Xtremefaith
Xtremefaith / Submenu Touch Devices.js
Created Dec 10, 2013
Ever have trouble getting hover effects to work on mobile devices that don't have :hover events? Sub-menus are a common area with this problem, here is a snippet of how you can resolve that.
View Submenu Touch Devices.js
/*!
Fix for iOS touch/hover event with submenus
*/
$('.nav .parent').on('click', function(){
  $(this).find('.submenu').slideToggle('fast');
});
$(document).on('touchstart click', function(){
  if(!$(this).hasClass('.parent')){
    $('.parent .submenu').fadeOut('fast');
  }
@Xtremefaith
Xtremefaith / ignore_wp-config.md
Last active Dec 30, 2015
Developing locally? Here's a quick snippet for ignoring your local wp-config.php settings
View ignore_wp-config.md

Developing locally? Here's a quick snippet for ignoring your local wp-config.php settings

git update-index --assume-unchanged -- wp-config.php

Thanks to Linquize: http://stackoverflow.com/a/14513920/1058371

####Use on other settings files as well

git update-index --assume-unchanged -- wp-content/sftp-config.json