Skip to content

Instantly share code, notes, and snippets.

View Xtremefaith's full-sized avatar
:bowtie:
I may be slow to respond.

Nick Worth Xtremefaith

:bowtie:
I may be slow to respond.
View GitHub Profile
@Xtremefaith
Xtremefaith / setup.sh
Created January 17, 2023 22:54 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@Xtremefaith
Xtremefaith / keybase.md
Created September 22, 2018 05:34
Public Keybase verification

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 March 14, 2017 21:04 — forked from neilgee/git.css
Git Command Line Reference - Notes and reminders on set up and commands
/*
* 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 March 14, 2017 03:12 — forked from natelandau/.bash_profile
Mac OSX 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 October 1, 2015 23:51
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.
/**
* 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);
});
@Xtremefaith
Xtremefaith / Intro to Grunt.md
Last active August 29, 2015 14:10
Grunt Setup
@Xtremefaith
Xtremefaith / Blank-Search.php
Last active August 29, 2015 13:57
Want to redirect a user who enters a blank search request, here is a snippet to help with that.
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 January 4, 2016 07:49
All kinds of helpful aliases and configuration options. Check them out!

##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 December 18, 2013 16:44
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
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 December 10, 2013 18:55
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.
/*!
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');
  }