[ Launch: reddit base ] f181cec949f90a5b8410376e9156deb0 by joshuarule[ Launch: reddit base ] 6633418 by enjalot[ Launch: simple histogram ] 6631652 by enjalot
This file contains hidden or 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
facebookHelper.prototype.getMedia = function (post) { | |
console.log(post.type); | |
console.log(post.caption); | |
var imageUrl = post.type == "link" ? (post.picture ? this.cleanImageUrl(post.picture.match(/(url=)(.+)$/)[2]) : null) : (this.fbFeedUrl + "{objectId}/picture?type=normal&redirect=true&access_token={token}" | |
.replace("{objectId}", post.object_id) | |
.replace("{token}", this.accessToken)); | |
if (post.type == "link" || post.type == "photo" || post.type == "event") { | |
return imageUrl ? this.imgTemplate.replace(/{url}/g, imageUrl).replace(/{description}/g, post.description) : "" | |
+ (post.type == "link" ? | |
this.linkTemplate.replace(/{linkText}/g, post.name ? post.name : post.story).replace(/{href}/g, post.link) + (post.description ? this.descriptionTemplate.replace(/{description}/g, post.description) : '') |
This file contains hidden or 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
body, | |
html { | |
height: 100%; | |
} | |
body { | |
display: flex; | |
flex-direction: column; | |
} |
[ Launch: bar chart ] f5636ea1caacf50bdcddca99710f3280 by joshuarule[ Launch: reddit base ] 6633418 by enjalot[ Launch: simple histogram ] 6631652 by enjalot
This file contains hidden or 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
const gallery = { | |
type: { | |
"default": { | |
maxSlides: 10, // static | |
galleryTitle: string, // max 20 char | |
autoPlay: boolean, | |
slideDuration: number in seconds min 3 - 10, | |
slides: [ | |
{ | |
slideTitle: string, // optional |
This file contains hidden or 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
import React, { Component, Fragment } from 'react'; | |
import ReactDOM from 'react-dom' | |
const modalRoot = document.getElementById('modal-root') | |
export default class Modal extends Component { | |
render() { | |
const {isVisible} = this.props | |
return ReactDOM.createPortal( | |
<Fragment> |
This file contains hidden or 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
async getSkus(starting_after, result = []) { | |
const skus = await stripe.skus.list({starting_after: starting_after}); | |
result.push(skus) | |
if(skus.length === 100) { | |
return getSkus(skus[skus.length], result); | |
} | |
return result | |
} | |
let skus = getSkus(); |
OlderNewer