Skip to content

Instantly share code, notes, and snippets.

View whyisjake's full-sized avatar
✈️

Jake Spurlock whyisjake

✈️
View GitHub Profile
<style>
.container {
width: 300px;
}
.window {
width: 300px;
float: left;
}
.prev {
left: -300px;
@whyisjake
whyisjake / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
// This is the ideal post, based on the current pointer.
$ideal = $query->posts[ $index ]->ID;
if ( in_array( $ideal, $used ) ) {
// If it is in the array, update the index to the next.
// What this doesn't have, is a way to go 2+...
$index++
}
// Grab the post.
<?php
/**
* Number Tower
*/
$rows = array(
array( 21, 24, 0, 9, 0, 0, 2 ),
array( 45, 30, 0, 11, 9, 0 ),
array( 75, 0, 0, 20, 0 ),
array( 0, 0, 0, 38 ),
@whyisjake
whyisjake / phpconsole.sublime-snippet
Created December 4, 2014 19:42
PHP Console Add this to ~/Library/Application Support/Sublime Text 2/Packages/User
<snippet>
<content><![CDATA[?><script>console.log(<?php echo json_encode( \$${1:this} ); ?>);</script><?php]]></content>
<tabTrigger>phpconsole</tabTrigger>
<scope>source.php</scope>
<description>PHP Console</description>
</snippet>
@whyisjake
whyisjake / phpconsole.sublime-snippet
Created September 22, 2014 20:57
Little Sublime Text snippet to take a PHP object, and output as JSON, and then console.log() it.
<snippet>
<content><![CDATA[<script>console.log(<?php echo json_encode( ${1:\$this} ); ?>);</script>]]></content>
<tabTrigger>phpconsole</tabTrigger>
<scope>source.php</scope>
<description>PHP Console</description>
</snippet>
<?php
// The date to start on.
$current_year = date( 'Y' );
// This doesn't matter that much, but it will
// make the page load a little faster if you
// know exactly what the range is.
$ending_year = 2000;
@whyisjake
whyisjake / DbKJr.markdown
Created June 17, 2014 00:10
A Pen by Jake Spurlock.
$(document).ready(function() {
function isValidEmail( $email ) {
return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email);
};
$('.CLASS-OF-SUBMIT-BUTTON').click( function() {
var email = $('#tyvyh-tyvyh').val();
if ( isValidEmail( email ) ) {
$(".fancybox2").fancybox({
width: 640,
@whyisjake
whyisjake / index.html
Last active March 5, 2022 10:11
Table for MakerCon
<tr>
<td><a href="http://fsl3d.com">FSL3D</a></td>
<td>High quality 3D printer with on-board internet connectivity and 'app-store'</td>
</tr>
<tr>
<td><a href="http://www.lithouse.co/">Lithouse</a></td>
<td>Lithouse makes home automation seamless and meaningful. Lithouse device can discover nearby smart devices, allow user to trigger action from one device to another. Makers can connect their DIY device with Lithouse apps for control and trigger action to a 3rd party device. With Lithouse app, user can also review and comment on their smart devices, let everyone know what the loved (or hated) about those devices.</td>
</tr>
<tr>
<td>modio</td>