Skip to content

Instantly share code, notes, and snippets.

View Lyonsclay's full-sized avatar
🎯
Focusing

Lyonsclay Lyonsclay

🎯
Focusing
View GitHub Profile
class App extends React.Component {
constructor() {
super();
this.state = {
xMax: window.innerWidth,
yMax: window.innerHeight,
xVelocity: 0,
hideControls: false
};
@Lyonsclay
Lyonsclay / index.html
Created September 7, 2016 21:20
Shadowing CSS Animation - static
<div id="app"></div>
@Lyonsclay
Lyonsclay / Gemfile.lock
Created June 15, 2016 15:54
Gemfile.lock for Spree Commerce 3-0-stable with spree_tax_cloud 3-0-stable.
GIT
remote: git://github.com/spree-contrib/spree_tax_cloud.git
revision: 34f027976ec5014161bdbf0a0900bec5a1c19348
branch: 3-0-stable
specs:
spree_tax_cloud (3.0.0)
savon (~> 2.5.1)
spree_backend (~> 3.0.0)
spree_core (~> 3.0.0)
tax_cloud (~> 0.3.0)
@Lyonsclay
Lyonsclay / JS sync async
Created November 14, 2014 18:00
Compare basic JavaScript synchronous function to asynchronous function.
//Expected behaviour from synchrous function.
function output(value) { return value; }
var sync = output("jambalaya");
console.log('sync === "jambalaya"');
console.log(sync === "jambalaya"); //true
//Difficulty in capturing value from asynchronous call.
var async = setTimeout(function () {
console.log("Stay Great");
// On document load execute code for directions to business.
$(document).on('ready page:load', function() {
// Create new map with infowindow and marker. //
// New map with a map_canvas ( width, height ) and options.
var map_canvas = document.getElementById('map_canvas');
// Latlng for buisiness hardcoded.
var myLatlng = new google.maps.LatLng(38.197255, -85.767465);
var map_options = {
@Lyonsclay
Lyonsclay / carousel.js
Created November 8, 2013 02:35 — forked from ksolo/carousel.js
Image Carousel
@Lyonsclay
Lyonsclay / form-validator.js
Last active December 27, 2015 17:19 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
//Your code...
$("form").on("submit", function(event){
event.preventDefault();
var email = $('form input[name="email"]').val()
var password = $('form input[name="password"]').val()
var email_format = /.+@.+\..+/
var one_digit = /\d+/
var one_cap = /[A-Z]+/
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.