Skip to content

Instantly share code, notes, and snippets.

Avatar
☀️
Enjoying SoCal "Fall"

Jimmy Wilson jimmynotjim

☀️
Enjoying SoCal "Fall"
View GitHub Profile
View content-kitchen-sink.html
<h1>
This is the primary heading and there should only be one of these per page
</h1>
<p>
A small paragraph to <em>emphasis</em> and show <strong>important</strong> bits.
</p>
<ul>
<li>This is a list item
</li>
<li>So is this - there could be more
@ericrasch
ericrasch / include-tweets.php
Created Mar 15, 2012
How to display your latest tweets in your WordPress site without a plugin
View include-tweets.php
<?php
// How to display your latest tweets in your WordPress site without a plugin
// Source: http://dinolatoga.com/2010/07/31/how-to-display-your-latest-tweets-in-your-wordpress-blog-without-a-plugin/
include_once(ABSPATH . WPINC . '/feed.php');
//configuration
$username = "EricRasch"; // Just insert the username of the Twitter account you want to display
$feed = "http://twitter.com/statuses/user_timeline/$username.rss"; // Changed the code from dinolatoga.com to actually use the username variable
$num = 2; // Set the number of Tweets you want to display
View WP - Meta Links List.php
View dabblet.css
/**
* 3D cube
*/
body {
perspective: 99999px;
}
body > section {
display: inline-block;
View fn-post-custom-fields-infographic.php
<?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(
@hay
hay / has-overflow-scrolling.js
Created Nov 7, 2012
Check if a browser supports the overflow-scrolling CSS property, optionally with a prefix
View has-overflow-scrolling.js
function hasOverflowScrolling() {
var prefixes = ['webkit', 'moz', 'o', 'ms'];
var div = document.createElement('div');
var body = document.getElementsByTagName('body')[0];
var hasIt = false;
body.appendChild(div);
for (var i = 0; i < prefixes.length; i++) {
var prefix = prefixes[i];
@dbushell
dbushell / gist:4131104
Created Nov 22, 2012
Animate scrolling to an element or offset
View gist:4131104
/*!
* requires jQuery
* usage:
* Scroller.to({ offset: 100 });
* Scroller.to({ target: $('#main') });
*
* advanced usage (with additional easing function not provided here)
* Scroller.to({ target: $('#main'), delay: 500, multiplier: 1.5, easing: 'easeOutQuad' });
*/
var Scroller = (function()
@germanny
germanny / fn-absolute-ancestor.php
Created Dec 6, 2012
Function to find grandchildren pages
View fn-absolute-ancestor.php
/* 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);
@meyerweb
meyerweb / US Custom.keylayout.xml
Last active Dec 11, 2015
An OS X US keyboard layout file with some customizations (created using Ukelele running on Snow Leopard, if that matters).
View US Custom.keylayout.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 2.1.10 on 2012-07-12 at 12:43 (EDT)-->
<!--
An OS X US keyboard layout file with the following customizations:
* Option-. ONE DOT LEADER ( ․ )
* Option-h UPWARDS WHITE ARROW ( ⇧ )
* Option-j UP ARROWHEAD ( ⌃ )
* Option-k OPTION KEY ( ⌥ )
@viljamis
viljamis / nav.html
Last active Dec 14, 2015
Simple responsive navigation toggle script without library dependencies and with touch screen support (349 bytes minified and gzipped). Live demo: http://codepen.io/viljamis/full/gAatl
View nav.html
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>Nav toggle</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<ol id="nav" class="closed">
<li class="active"><a href="#">Home</a></li>