Skip to content

Instantly share code, notes, and snippets.

@nola
nola / tweenmax-scroll
Last active August 5, 2018 05:47
Calculate percentage of scroll Then uses tweenmax callbacks to continue the animation
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.10.1/TweenMax.min.js"></script>
<script>
$(function(){
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
.roundcorners { position: relative; top: 0; left: 0; }
.oldIE .roundcorners { overflow: visible; }
.roundcornersInnerWrap { position: relative; top: 0; left: 0; }
.roundcorners .insideW { background-image:url("../images/corners/cornerWhiteInside.png"); }
.roundcorners .outsideW { background-image:url("../images/corners/cornerWhiteOutside.png"); }
.roundcorners .outsideWNoBdr { background-image:url("../images/corners/cornerWhiteOutsideNoBdr.png"); }
.roundcorners .outsideB { background-image:url("../images/corners/cornerBlackOutside.png"); }
.roundcorners .roundcorner { position: absolute; z-index: 1000; display: block; height: 10px; width:10px; }
.roundcorners .rcLeft.rcTop { left: 0; right: auto; top: 0; bottom: auto; background-position: left top; }
.roundcorners .rcRight.rcTop { left: auto; right: 0; top: 0; bottom: auto; background-position: right top; }
@keeganbrown
keeganbrown / gist:5099954
Created March 6, 2013 15:13
Cycle 2 Touch Swipe Detection, without iOS6 workaround
//TOUCH EVENTS
polyfillRequestAnimFrame(window);
var touchDragX = 0;
var lastTouchX = 0;
var sliderapi = null;
function onTouchStart (event) {
touchDragX = 0;
var touchPos = getTouchPos(event);
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@robflaherty
robflaherty / csv-to-json.php
Created September 1, 2011 02:26
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed