Skip to content

Instantly share code, notes, and snippets.

View jimmynotjim's full-sized avatar
☀️
Enjoying SoCal "Fall"

Jimmy Wilson jimmynotjim

☀️
Enjoying SoCal "Fall"
View GitHub Profile
<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 March 15, 2012 21:33
How to display your latest tweets in your WordPress site without a plugin
<?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
@Abban
Abban / WP - Meta Links List.php
Created June 23, 2012 18:24
WP - Meta links list
@LeaVerou
LeaVerou / dabblet.css
Created August 7, 2012 19:52
3D cube
/**
* 3D cube
*/
body {
perspective: 99999px;
}
body > section {
display: inline-block;
@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(
@hay
hay / has-overflow-scrolling.js
Created November 7, 2012 16:14
Check if a browser supports the overflow-scrolling CSS property, optionally with a prefix
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 November 22, 2012 13:10
Animate scrolling to an element or offset
/*!
* 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 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);
@meyerweb
meyerweb / US Custom.keylayout.xml
Last active December 11, 2015 02:28
An OS X US keyboard layout file with some customizations (created using Ukelele running on Snow Leopard, if that matters).
<?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 ( ⌥ )
@arielsalminen
arielsalminen / nav.html
Last active December 14, 2015 12:18
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
<!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>