Skip to content

Instantly share code, notes, and snippets.

View kbk0125's full-sized avatar

Kevin Kononenko kbk0125

View GitHub Profile
//Your custom function. API key provided after you "Publish" your version of the function
blockspring.runParsed("YOURAPIKEYHERE", {
//Can either be POST or GET, depending on if you want to read or write
'type': 'POST',
// This is your internal function name.
// Must match the key from urlHash so you can access the appropriate sheet
'name': 'postEntry',
// Values if it is a post. If a get, should be Query just like the normal examples.
"values": allData},
function(res){
var userData= getGithubData('testuser');
function getGithubData(username) {
$.get('https://api.github.com/users/' +username, function(user){
var key= user.data.info.name
$.get('https://api.github.com/users/' +key+ '/repos&per_page=100', function(user2){
var followers= user2.data.info.followers
storeFollowers(followers, function(){
console.log('done');
})
var amount= 1000;
getCasinoTokens(1000)
.then(function(tokens){
return playBlackjack(tokens*0.3)
})
.then(function(moreTokens){
return playRoulette(moreTokens*0.05)
})
.then(function(evenMoreTokens){
var amount= 1000;
getCasinoTokens(amount)
.then(blackjackTable)
.then(rouletteTable)
.then(pokerTable)
.catch(function(err){
complainToManager(err)
startDrinking()
})
var amount= 1000;
getCasinoTokens(amount, function(tokens, err){
if (err) complainToManager(err)
playBlackjack(tokens*0.3, function(moreTokens, err){
if (err) complainToManager(err)
playRoulette(moreTokens*0.05, function(evenMoreTokens, err) {
if (err) complainToManager(err)
playPoker(evenMoreTokens*0.5, function(finalTokens, err){
if (err) complainToManager(err)
function packBox(item){
console.log('Put ' +item+ ' in the box');
function addressPackage(address){
console.log('Addressed the box to ' +address+' and ready to send the '+item+' gift');
}
return addressPackage;
}
var brotherGift = packBox('jersey')
var motherGift = packBox('iTunesCard')
var fatherGift = packBox('golfclubs')
var sisterGift = packBox('lacrossestick')
brotherGift('123 Main Street, Anywhere USA 01234')
//Put jersey in the box
// Addressed the box to 123 Main Street, Anywhere USA 01234 and ready to send the jersey gift
motherGift('123 High Street, Los Angeles USA 01234')
//Put iTunesCard in the box
<body>
<div class='fullSundae'>
<div class='cherry'></div>
<div class='whippedCream'></div>
<div class='iceCreamScoop'></div>
<div class='iceCreamScoop'></div>
<div class='glass'>
<div class='iceCreamScoop'></div>
<div class='iceCreamScoop'></div>
<div class='iceCreamScoop'></div>
.fullSundae{
height:500px;
position:static;
}
.fullSundae > .iceCreamScoop{
height:100px;
}
.glass{
var vadersEmpire = React.createClass({
getInitialState: function() {
return {
rebelLocation: ''
};
},
render: function() {
return (
<div>