This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Your stuff --> | |
<!-- Include Sidr bundled CSS theme --> | |
<link rel="stylesheet" href="stylesheets/jquery.sidr.dark.css"> | |
</head> | |
<body onload="init()"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# let's start fresh | |
rm -rf .demeteorized | |
rm /tmp/newfile | |
# run + cd | |
demeteorizer | |
cd .demeteorized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
collection.find().observe({ | |
removed: function (oldDoc) { | |
// delete oldDoc._id from S3 | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on("mouseenter", ".plot .label", | |
function (event) { | |
$(this).animate({ opacity: 0 }, | |
function () { | |
$(this).addClass('hidden-label'); | |
} | |
).delay(5000).animate({ opacity: 0.85 }, | |
function () { | |
$(this).removeClass('hidden-label'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var amount = Math.abs(invoice.total); | |
stripe.charges.refund(charge.data[0].id, amount, | |
function (err, refund) { | |
)}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param chargeId | |
*/ | |
refundChargeById: function (chargeId) { | |
var amount = 300; // this causes an undefined params error even though the underlying method doesn't expect {} | |
stripe.charges.refund(chargeId, amount, | |
function (err, refund) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.route('/', { | |
before: function() { | |
if(!Meteor.loggingIn() && !Meteor.user()) { | |
this.redirect("login"); | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deps.autorun(function () { | |
var current = Router.current(); | |
Deps.afterFlush(function () { | |
$('.content-inner').scrollTop(0); | |
$(window).scrollTop(0); | |
}); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_token(): | |
message = bytes("Message") | |
secret = bytes("secret") | |
signature = base64.b64encode(hmac.new(secret, message, digestmod=hashlib.sha256).digest()); | |
print(signature) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyController = RouteController.extend({ | |
before: function () { | |
var onReady = function () { | |
if (/* whatever */) | |
this.render(); | |
}; | |
var onWait = function () { | |
// maybe show a loading or logging in function. | |
}; |
OlderNewer