Skip to content

Instantly share code, notes, and snippets.

View whyisjake's full-sized avatar
✈️

Jake Spurlock whyisjake

✈️
View GitHub Profile
@whyisjake
whyisjake / index.html
Created February 28, 2012 22:03
Get Users Lat and Longitude
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Get web visitor's location</title>
<meta name="robots" value="none" />
</head>
<body>
<div id="yourinfo"></div>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAp04yNttlQq-7b4aZI_jL5hQYPm-xtd00hTQOC0OXpAMO40FHAxQMnH50uBbWoKVHwgpklyirDEregg"></script>
<script type="text/javascript">
<?php
/*
Plugin Name: Make: Projects oEmbed
Plugin URI: http://makeprojects.com/
Description: Embed a Make Project into your Wordpress blog, just copy and paste the URL of the project (e.g. http://makeprojects.com/Project/Build-a-Makerspace/1390/1 ). This plugin will automatically embed using wp_oembed_add_provider. Enjoy a interactive Make Project's experience right in your blog.
Author: whyisjake, tmoskowite
Version: 1.0
Author URI: www.makezine.com
*/
@whyisjake
whyisjake / signup.html
Created April 2, 2012 21:21
Beta Team Signup
<form action="http://makermedia.createsend.com/t/r/s/wairh/" method="post" id="subForm">
<fieldset>
<legend>Beta Team Sign Up</legend>
<div class="clearfix">
<label for="wairh-wairh">Email</label>
<div class="input">
<input class="xlarge" id="cm-wairh-wairh" name="cm-wairh-wairh" size="30" type="text">
</div>
@whyisjake
whyisjake / js embed
Created April 3, 2012 22:01
js embed
<div style="width:125px;height:125px;float:right;margin-top:-15px;padding:0 10px 5px;"><!-- mz_radioshack_125x125 -->
<script type='text/javascript'>
GA_googleFillSlot("mz_radioshack_125x125");
</script></div>
@whyisjake
whyisjake / random.pl
Created April 9, 2012 18:29
Random Video
#!/usr/bin/perl
$num = int(rand(3));
print $num;
if ($num == 0) {
print '<div class="span4"><h3 class="meet">Meet the Makers</h3><iframe width="100%" height="200" src="http://www.youtube.com/embed/Ig-DbfPoz3o" frameborder="0" allowfullscreen></iframe></div>';
@whyisjake
whyisjake / arduino_robot
Created April 10, 2012 20:35
Arduino Robot Code
/*
Original code by Nick Brenn
Modified by Marc de Vinck
Make Projects Arduino-based 4WD robot
http://makeprojects.com/Project/Build-your-own-Arduino-Controlled-Robot-/577/1
*/
#include <AFMotor.h>
AF_DCMotor motor1(1, MOTOR12_8KHZ);
AF_DCMotor motor2(2, MOTOR12_8KHZ);
AF_DCMotor motor3(3, MOTOR12_1KHZ);
@whyisjake
whyisjake / Hardware.html
Created April 10, 2012 20:46
Hardware Badge
<a href="http://makezine.com/hardware-innovation-workshop/"><img src="http://cdn.makezine.com/make/hardware/30233_thumb_hardware-Innovation-webbanner-300x250.jpeg" alt="Hardware Innovation Workshop" /></a>
@whyisjake
whyisjake / search_terms.php
Created April 11, 2012 21:42
Related Terms from Search
$haystack = htmlspecialchars($_GET['q']);
$hay = explode(" ", $haystack);
//print_r($hay);
$args = array(
'tax_query' =>
array(
'taxonomy' => 'search_terms',
'field' => 'slug',
//Removed the bogus stuff in place of strip_tags
$att = "value";
foreach ($results as $item) {
$image = $item->xpath(".//DataObject[@type='cse_image']/Attribute");
if ( !empty($image)) {
echo '<div class="row result"><div class="result">';
echo '<div class="span2">';
echo '<img class="thumbnail" src="';
echo $image[0]->attributes()->$att;
@whyisjake
whyisjake / json2excel.php
Created April 17, 2012 00:18
json to Excel
<?php
$url = 'makers.json';
$contents = file_get_contents($url);
$json_output = json_decode($contents);
// Don't print anything if we didn't get a good response
function cleanData(&$str)
{