Skip to content

Instantly share code, notes, and snippets.

View jeffsebring's full-sized avatar

Jeff Sebring jeffsebring

  • Spokane, Washington USA
View GitHub Profile
@jeffsebring
jeffsebring / wordpress_admin_bar_menu.php
Created April 1, 2012 05:58
WordPress Admin Bar Menu Example
add_action('admin_bar_menu', 'webmaster_admin_bar_menu', 99);
function webmaster_admin_bar_menu() {
global $wp_admin_bar;
$menus[] = array(
'id' => 'webmaster',
'title' => 'Web Master',
'href' => 'http://yourdomain.com/',
'meta' => array(
@jeffsebring
jeffsebring / gisted.php
Created April 1, 2012 08:41
Gisted Shortcode WordPress Plugin Class
<?php
/*
Plugin Name: Gisted
Plugin URI: http://jeffsebring.com/wordpress/plugins/gisted
Description: Print your Github Gists as HTML on your WordPress blog
Author: Jeff Sebring
Version: 0.1.2
Author URI: http://jeffsebring.com/
Copyright 2012 Jeff Sebring
@jeffsebring
jeffsebring / local-config.php
Created April 2, 2012 03:25
WordPress Pro Config
<?php
# Turn on Caching
#define('WP_CACHE', true);
# Set the Memory Limit
#define('WP_MEMORY_LIMIT', '64M');
# Development Table prefix
#$table_prefix = 'dev_';
@jeffsebring
jeffsebring / wp_permalinks.nginx
Created April 3, 2012 22:03
WordPress NGINX Permalink rewrites
@jeffsebring
jeffsebring / nested_media_queries.scss
Created May 1, 2012 06:36
Compass Nested Media Queries
#sidebar {
width: 100%;
@media only screen and ( min-width: 480px; ) {
width: 33.33333%;
float: right;
}
}
#!/usr/bin/env ruby
# Author: Jeff Sebring
# Script: Zip DB
# Date: 6.2.2012
# Description: Dump and Zip a MYSQL Database and save like 6 keystrokes!
puts 'Enter the Database Name: '
db = gets.chomp
dump = `sudo mysqldump -u root -p #{db} | gzip > #{db}.sql.gz`
@jeffsebring
jeffsebring / archbang_init.sh
Created June 18, 2012 14:38
Initial Archbang Update
#!/bin/bash
cd /etc/pacman.d
cp mirrorlist mirrorlist.backup
rankmirrors -n 6 mirrorlist.backup > mirrorlist
pacman -Syy
pacman-key --init; pacman-key --populate archlinux
pacman -Syu --ignore filesystem && pacman -S filesystem --force && reboot
@jeffsebring
jeffsebring / archbang_install.sh
Created June 18, 2012 14:46
First Archbang Packages and Apps
#!/bin/bash
@jeffsebring
jeffsebring / dual_displays_1920.sh
Created June 18, 2012 15:14
Set Dual Displays DVI 1920x1080
#!/bin/bash
xrandr --output DVI-I-1 --mode 1920x1080 --output DVI-I-2 --mode 1920x1080 --right-of DVI-I-1
@jeffsebring
jeffsebring / _extend.sass
Created June 20, 2012 16:23
Render Extended Sass Classes
.position-relative
position: relative
.float-left
float: left
.float-right
float: right
.float-none