Skip to content

Instantly share code, notes, and snippets.

View robertcedwards's full-sized avatar
🖼️
Framing

Robert C Edwards robertcedwards

🖼️
Framing
View GitHub Profile
<!-- Begin Code Snippet -->
<div class='focusvid' style='position: relative; display: inline-block; text-align: left;'>
<video src='MVI_7840 - Broadband.m4v' type='video/mp4' onclick='vid_4ufrut8(event, this);' style='width: 600px; height: auto; cursor: crosshair' oncanplay='vid_4ufrut8(null, this);'></video>
<script>
function vid_4ufrut8(e, el){
var focusmap = [
[71,27,154,160,164,190,155,150,154,160,150,154,154,147,142,142,128,155,164,128],
[11,168,182,164,155,168,149,154,154,160,164,155,147,154,6,126,162,160,160,12],
[33,164,160,154,164,154,166,171,193,182,160,182,154,149,13,158,155,175,149,114],
@robertcedwards
robertcedwards / readme.md
Created January 26, 2013 00:01
readme for blendout

#(Lexus Blend Out)[http://www.lexusblendout.com] ##Digital/Print Hybrid Ad/Microsite ###Client:Lexus/SI ####Sports Illustrated 50th

Developer: (George Villa)[@gvilla23] Lead Tech: (Rob Edwards)[@robertcedwards] Producer: Hollie Vogel Creatives: *Eric Arnold

@robertcedwards
robertcedwards / gist:4688594
Created February 1, 2013 02:05
Form to control Electric IMP via HTTP IN
<html>
<head></head>
<body>
<form action="https://api.electricimp.com/v1/d8a33309dbb0d293/30420cd686f1a2a2"
METHOD="post">
<input type="hidden" id="value" name="value" value="1">
<input type="submit" value="Turn Coffee Pot On">
</form>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<form action="https://api.electricimp.com/v1/d8a33309dbb0d293/30420cd686f1a2a2" id="searchForm">
<input type="hidden" id="value" name="value" value="1">
<input type="submit" value="Turn Coffee Pot On">
</form>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<form action="https://api.electricimp.com/v1/d8a33309dbb0d293/30420cd686f1a2a2" id="searchForm">
<input type="hidden" id="value" name="value" value="1">
<input type="submit" value="Turn Coffee Pot On">
</form>
Single line, no attribution:
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
</figure>
Single line, with attribution and optional cite:
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
@robertcedwards
robertcedwards / gist:5172182
Last active December 15, 2015 00:19
Permanently ignore .DS_Store files in your Git repos
git config --global core.excludesfile ~/.gitignore_global && echo .DS_Store >> ~/.gitignore_global
"""
Author: [email protected]
to run you will need to install the following:
pip install requests
pip install simplejson
get the auth token and device id by sniffing the nike app syncing
with api.nike.com with charles
@robertcedwards
robertcedwards / gist:5588385
Created May 15, 2013 23:51
Querying by Post Type
$args = array( 'post_type' => 'product', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
@robertcedwards
robertcedwards / customposttype.php
Created May 15, 2013 23:52
Custom Post Types in the Main Query
// Show posts of 'post', 'page' and 'movie' post types on home page
add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
function add_my_post_types_to_query( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( 'post_type', array( 'post', 'page', 'movie' ) );
return $query;
}