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 / 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');
  }
@Xtremefaith
Xtremefaith / ignore_wp-config.md
Last active December 30, 2015 04:59
Developing locally? Here's a quick snippet for ignoring your local wp-config.php settings

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

@Xtremefaith
Xtremefaith / Widget-Form.php
Created December 3, 2013 18:07
This is a quick basic template for WordPress widget forms function. Passing an array through a loop that creates the fields. This can be expanded to included columns, but that is not the intention of this gist. Currently only builds TEXT & SELECT fields
<?php
function form($instance){
/** Merge with defaults */
$instance = wp_parse_args( (array) $instance, $this->defaults ); //Only if you set defaults in constructor (i.e.- $this->defaults = array(); )
extract ( $instance, EXTR_SKIP);
//Create new fields by adding to this array
$fields = array(
'title' => array(
'label' => __( 'Title', 'div' ),
@Xtremefaith
Xtremefaith / ST2 Snippets.md
Last active December 20, 2015 23:49
Sublime Text Snippets

Inline PHP

<snippet>
    <content><![CDATA[
<?php ${1:${TM_SELECTED_TEXT}} ?>
]]></content>
	<tabTrigger>?</tabTrigger>
	<description>Inline PHP</description>
</snippet>