Skip to content

Instantly share code, notes, and snippets.

View gooddadmike's full-sized avatar

mike searcy gooddadmike

View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@marcbc
marcbc / README.md
Last active September 2, 2019 06:54
Pie Chart drill down test

Playing with D3.js to get a drill down behavior for a hierarchical data collection represented in pie charts. See live example

@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@malarkey
malarkey / Contract Killer 3.md
Last active July 5, 2024 08:43
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@jvandyke
jvandyke / .gitconfig
Last active January 27, 2023 08:11
Use PHPStorm/WebStorm for git diff and merge tools
# ~/.gitconfig
# Add this to your global git configuration file
# Change phpstorm to webstorm, if you use that.
# Diff and merge tool changes
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...`
[merge]
tool = phpstorm
[diff]
tool = phpstorm
@leemour
leemour / Zsh & theme
Last active April 12, 2023 08:53
Zsh installation and Agnoster theme settings
# Railscast
http://railscasts.com/episodes/308-oh-my-zsh
# Install Zsh
sudo apt-get update && sudo apt-get install zsh
# Install Oh-my-zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
# Make ZSH default shell
@azanebrain
azanebrain / Create WordPress Users
Created June 29, 2013 23:16
Create WordPress Users with a function
//This would be good for setting up a stock dev environment. So instead of dumping in a DB, you would run an initializer with options
$users[0] = array(
'first_name' => 'Daniel',
'last_name' => 'Pataki',
'user_login' => 'danielpataki',
'user_pass' => 'mysupersecretpass',
'user_email' => 'mysupermail@mymail.com',
'display_name' => 'Daniel',
'description' => 'Guitar-wielding Web developer',
@azanebrain
azanebrain / disable-admin-bar
Created December 11, 2013 05:43
Don't allow subscribers to view the admin panels or the admin bar
/**
* Disable admin bar on the frontend of your website
* for subscribers.
*/
function themeblvd_disable_admin_bar() {
if( ! current_user_can('edit_posts') )
add_filter('show_admin_bar', '__return_false');
}
add_action( 'after_setup_theme', 'themeblvd_disable_admin_bar' );
@azanebrain
azanebrain / hide-wp-plugins
Created January 23, 2014 00:24
Hide plugins and settings panels from the WordPress admin panels to make sure certain users don't deactivate them, or change settings.
add_filter( 'all_plugins', 'hide_plugin_list' );
function hide_plugin_list( $plugins ) {
if ( is_admin() ) {
//Only run this if we're in the Admin panels
unset( $plugins[ 'advanced-custom-fields/acf.php'] );
//Admin only plugins
if ( ! current_user_can( 'administrator' ) ) {
unset( $plugins[ 'better-wp-security/better-wp-security.php'] );
@azanebrain
azanebrain / multisite-upload-path.php
Created January 27, 2014 20:20
Set a unique upload path for each site on a multisite network (MU Plugin)
<?php
add_filter('upload_dir', 'mu_media_upload_dir');
function mu_media_upload_dir($upload) {
$site_title=str_replace( ' ' , '_' , get_bloginfo('name','raw') );
$upload['path'] = ABSPATH . '/shared/' . $site_title;
switch_to_blog(1);
$upload['url'] = site_url() . '/shared/' . $site_title;
restore_current_blog();
$upload['subdir'] = "";
$upload['basedir'] = $upload['path'];