Skip to content

Instantly share code, notes, and snippets.

View germanny's full-sized avatar

Jen G germanny

View GitHub Profile
@germanny
germanny / dabblet.css
Created March 15, 2012 18:48 — forked from ericrasch/dabblet.css
Horizontal Type Line Behind Text
/**
* Horizontal Type Line Behind Text
* Inspired by this discussion @ CSS-Tricks: http://css-tricks.com/forums/discussion/comment/51357#Comment_51357
* Available on jsFiddle: http://jsfiddle.net/ericrasch/jAXXA/
* Available on Dabblet: http://dabblet.com/gist/2045198
* Available on GitHub Gist: https://gist.github.com/2045198
*/
h2 {
@germanny
germanny / dabblet.css
Created March 21, 2012 23:34 — forked from chriscoyier/dabblet.css
Untitled
.holder {
position: relative;
width: 215px;
height: 215px;
margin: 20px;
z-index: 999;
cursor: pointer;
}
.h1 {
@germanny
germanny / fb-comments.html
Created May 24, 2012 01:47 — forked from jimmynotjim/fb-comments.html
Adaptive sizing for FB comments plugin
<!-- New HTML5 FB Comments -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
@germanny
germanny / fn-post-custom-fields-infographic.php
Created October 3, 2012 14:21
Infographic standard form
<?php
$ig_post_custom_fields = array (
"infographic" => array(
"name" => "is_infographic",
"std" => "",
"title" => "Is this an infographic post?",
"description" => "If you check this box, we'll add a Pin It share option.",
"type" => "checkbox"),
"image_url" => array(
@germanny
germanny / fn-videos.php
Created November 14, 2012 22:21
Updated video function, now including YouTube (and Vimeo)
<?php
function display_video($video_meta,$video_width,$video_height) {
$video_string = $video_meta; // url of the video; gonna use this to check if is a vimeo or youtube video
if( strpos($video_string, 'vimeo') ) {
/* =BEGIN: Insert Vimeo video from Custom Field ID
Source: http://wordpress.org/extend/plugins/lux-vimeo-shortcode/
@germanny
germanny / fn-absolute-ancestor.php
Created December 6, 2012 22:02
Function to find grandchildren pages
/* ABSOLUTE ANCESTOR
Returns the absolute ancestor (parent, grandparent, great-grandparent if there is, etc.) of a post. The absolute ancestor is defined as a page that doesnt have further parents, that is, its post parent is '0'
****************************************************************************************************************************************/
function get_absolute_ancestor($post_id){
global $wpdb;
$parent = $wpdb->get_var("SELECT `post_parent` FROM $wpdb->posts WHERE `ID`= $post_id");
if($parent == 0) //Return from the recursion with the title of the absolute ancestor post.
return $wpdb->get_var("SELECT `post_name` FROM $wpdb->posts WHERE `ID`= $post_id");
return get_absolute_ancestor($parent);
@germanny
germanny / shortcode-featured-schools-box.php
Last active December 10, 2015 01:08
Featured Schools Box Shortcode
@germanny
germanny / fn-featured-schools.php
Last active December 21, 2015 04:39
quick add featured schools to wp-admin post or page
@germanny
germanny / _multiple_local_environments_single_vm.md
Last active December 26, 2015 18:16
Using Vagrant to run local environments from a single VM
@germanny
germanny / Preferences.sublime-settings
Created December 26, 2015 20:41 — forked from jimmynotjim/Preferences.sublime-settings
Current ST2 User Settings
{
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/User/SublimeLinter/Phix Dark (SL).tmTheme",
"detect_indentation": true,
"file_exclude_patterns":
[
".DS_Store",
"dump.rdb"
],