Skip to content

Instantly share code, notes, and snippets.

captDaylight

Block or report user

Report or block captDaylight

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gimme auth
def authenticate(request):
# STEP 1: Generate a request token
post_url = '/auth/reqtoken'
params = urllib.urlencode({'client_id': client_id, 'client_secret':client_secret, 'type':'app'})
data = urllib2.urlopen('%s%s' % (base_url, post_url), params).read()
data = json.loads(data)
token = data['request_token']
print "here is the token"
url = "https://gimmebar.com/authorize?client_id="+client_id+"&token="+token+"&response_type=code"
updates = {'url': url, 'token':token}
View Grains animation
/* shake css animation */
.grain-animated{
-webkit-animation-fill-mode:both;
-moz-animation-fill-mode:both;
-ms-animation-fill-mode:both;
-o-animation-fill-mode:both;
animation-fill-mode:both;
-webkit-animation-duration:.3s;
-moz-animation-duration:0.2s;
-ms-animation-duration:1.5s;
View about page parallax
MADPRESS.About = {
init: function(data, callback) {
},
index: function(data, callback) {
var scrolling = false;
$('#about-side-nav').localScroll({ duration: 1000, onAfter: function() {
@captDaylight
captDaylight / gist:5850314
Created Jun 24, 2013
Landing page animation
View gist:5850314
MADPRESS.Index = {
init: function(data, callback) {
},
index: function(data, callback) {
// FIRST SLIDE ANIMATION /////////////////////////
var animateFinal = function(){
$('#blue-ball').animate({
View gist:5850325
/* shake css animation */
.grain-animated{
-webkit-animation-fill-mode:both;
-moz-animation-fill-mode:both;
-ms-animation-fill-mode:both;
-o-animation-fill-mode:both;
animation-fill-mode:both;
-webkit-animation-duration:.3s;
-moz-animation-duration:0.2s;
-ms-animation-duration:1.5s;
View gist:5850327
MADPRESS.About = {
init: function(data, callback) {
},
index: function(data, callback) {
var scrolling = false;
$('#about-side-nav').localScroll({ duration: 1000, onAfter: function() {
View gist:5850330
MADPRESS.About = {
init: function(data, callback) {
},
index: function(data, callback) {
var scrolling = false;
$('#about-side-nav').localScroll({ duration: 1000, onAfter: function() {
View gist:9212492
SpreeStore.module('Products.Show',function(Show, SpreeStore, Backbone,Marionette,$,_){
Show.Product = Backbone.Marionette.ItemView.extend({
tagName: 'div',
className: 'product',
template: "#product-template",
events: {
"click button": "addToCart",
"click #product-quantity-list li.quantity-drop": "selectQuantity",
"click #frequency-quantity-list li.quantity-drop": "selectFrequency",
View tween.js
function tween(finalPos, prevPos, tweenRatio) {
if (finalPos === prevPos) {
return prevPos;
} else {
let dist = Math.abs(finalPos - prevPos);
if (dist < 0.005) {
// set to final position when getting close
return prevPos;
} else {
You can’t perform that action at this time.