Skip to content

Instantly share code, notes, and snippets.

View Zackio's full-sized avatar

Zackary Allnutt Zackio

View GitHub Profile
@billerickson
billerickson / gist:1326009
Last active March 3, 2017 11:14
Add Extra Code to Any Menu
<?php
/**
* Add Extra Code to Any Menu
* @author Bill Erickson
* @link http://www.billerickson.net/customizing-wordpress-menus/
*
* @param string $menu
* @param object $args
* @return string modified menu
*/
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@xoner
xoner / movewin.sh
Created June 18, 2012 06:39
Move windows between monitors in a multimunitor setup in linux
#!/bin/bash
#++++++++++++++++
# Monitor Switch
#
# Moves currently focused window from one monitor to the other.
# Designed for a system with two monitors.
# Script should be triggered using a keyboard shortcut.
# If the window is maximized it should remain maximized after being moved.
# If the window is not maximized it should retain its current size, unless
# height is too large for the destination monitor, when it will be trimmed.
@timkinnane
timkinnane / shortcode.php
Created April 7, 2013 23:36
Wordpress shortcode example
<?php
// MyShortcode usage [myshortcode greeting="Hello" who="World"]
function myshortcode_func( $atts, $content = null ) {
// use given attributes or defined defaults
extract( shortcode_atts( array(
'greeting' => '',
'who' => ''
), $atts ) );
@bhubbard
bhubbard / .htaccess
Last active December 25, 2023 02:59
This is my template .htaccess file for WordPress on Cloud Sites.
# Apache Server Config | MIT License
# https://gist.github.com/bhubbard/6082577
# Modified from https://github.com/h5bp/server-configs-apaches
# ##############################################################################
# # Default WordPress #
# ##############################################################################
# http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/
# BEGIN WordPress
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2024 12:59
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@mattbanks
mattbanks / wp-setup.sh
Created March 14, 2014 18:01
Scaffold a new WordPress development site in Alfred, utilizing WP-CLI. Use this script to run as a Terminal Script. Customize for your theme needs, plugin needs, etc.
# Create directory for new site
cd ~/Sites
mkdir {query}
cd {query}
# Download latest version of WordPress
wp core download
# Setup wp-config file with WP_DEBUG enabled
wp core config --dbname={query} --dbuser=root --dbpass=root --dbprefix={query}wp_ --extra-php <<PHP
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
<?php
/**
* Remove Genesis Page Templates
*
* @author Bill Erickson
* @link http://www.billerickson.net/remove-genesis-page-templates
*
* @param array $page_templates
* @return array
@pepelsbey
pepelsbey / hocus.scss
Last active March 1, 2024 11:03
Simple “Hocus” Sass @mixin for :hover and :focus pseudos. Makes them easier to write and you’ll never forget to specify both.
@mixin hocus {
&:hover,
&:focus {
@content;
}
}
// Before
E {
&:hover,