Skip to content

Instantly share code, notes, and snippets.

View joshgreen's full-sized avatar
🏠
Working from home

Josh Green joshgreen

🏠
Working from home
View GitHub Profile
@joshgreen
joshgreen / gist:5e171e817041e6535c86
Created July 28, 2014 15:52
Custom comment in functions.php
function mytheme_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'div' == $args['style'] ) {
$tag = 'div';
$add_below = 'comment';
} else {
$tag = 'li';
$add_below = 'div-comment';
@joshgreen
joshgreen / gist:a3514348fcc85650fc36
Last active August 29, 2015 14:04
Typekit for wordpress
// TypeKit Fonts
/*
* @since Theme 1.0
*/
function theme_typekit() {
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/KITNUMBER.js');
}
add_action( 'wp_enqueue_scripts', 'theme_typekit' );
function theme_typekit_inline() {
[
{ "keys": ["ctrl+,"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+]"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["ctrl+m"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "<strong>${0:$SELECTION}</strong>" } },
{ "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "<em>${0:$SELECTION}</em>" } },
{ "keys": ["super+ctrl+u"], "command": "upper_case" },
{ "keys": ["super+ctrl+i"], "command": "lower_case" },
{ "keys": ["super+ctrl+y"], "command": "title_case" }
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export PATH="/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:$PATH"
if [ -f ~/.git-completion ]; then
source ~/.gitcompletion.bash
fi
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
@joshgreen
joshgreen / gist:d910c4e8ad01418ef929
Last active August 29, 2015 14:03
Sublime Text 3 User settings 20140901
{
"auto_complete": true,
"auto_indent": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"color_scheme": "Packages/User/predawn (SL).tmTheme",
"detect_slow_plugins": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_white_space": "selection",
@joshgreen
joshgreen / gist:6183691
Created August 8, 2013 10:56
Email button
<table cellpadding="0" cellspacing="0" border="0" width="190" height="25" style="background-color:#000;">
<tr>
<td align="center">
<img src="images/spacer.gif" alt="" style="display: block; border: 0" width="1" height="25"></td>
<td valign="middle" style="font-family: san-serif; font-size:14px;" align="center"><a href="#" style="color:#fff; display: inline-block; text-decoration: none;">Button text</a>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="200" height="50" style="background-color:#deb500;">
<tr>
<td align="center">
<img src="images/spacer.gif" alt="" style="display: block; border: 0" width="1" height="50"></td>
<td valign="middle" style="font-family: sans-serif; font-size:24px; font-weight: bold" align="center">
<a href="http://www.sdl.com/" style="color:#fff; display: inline-block; text-decoration: none;">Register here</a>
</td>
</tr>
</table>
@joshgreen
joshgreen / Jade lang kitchen sink
Created May 13, 2013 14:50
Jade lang kitchen sink
!!! 5
html(lang="en", class="no-js")
head
meta(charset="utf-8")
meta(http-equiv="X-UA-Compatible", content="IE=edge,chrome=1"")
title="Blank Site"
meta(name="descritption", content="")
meta(name="author", content="")
meta(name="viewport", content="width=device=device-width, initial-scale=1.0"")
link(rel="stylesheet", href="style.css")
@joshgreen
joshgreen / bits.sass
Created May 13, 2013 11:22
My Sass Bits partial I use for my boilerplate
@mixin text-wrap
overflow: hidden
text-overflow: ellipsis
white-space: nowrap
.group:after
content: ""
display: table
clear: both