View editlisting.js
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
const editListing = async ({ config, user, options = {} }) => { | |
const configRef = config._id; | |
const listingRef = options._id; | |
const item = await Item.findOne({ configRef, "listings._id": listingRef }).exec(); | |
if (!item) throw new Error("Item not found"); | |
const listing = item.listings.find(l => l._id.equals(listingRef)); | |
if (!listing.id) listing.id = new Date().getTime(); |
View Mobile hooking
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
const Navbar = (props) => { | |
const isMobile = useIsMobile(); | |
if(isMobile) return <Mobile /> | |
else return <DesktopNav /> | |
} | |
const DesktopNav = (props) => { | |
return <navbar className="desktop" /> | |
} |
View deploy.sh
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 | |
set -u | |
set -e | |
export NVM_DIR="$HOME/.nvm" | |
. "$NVM_DIR/nvm.sh" | |
target_branch="master" | |
working_tree="" |
View gist:aa9f21bf0d68e7155eba903266ec7228
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
<script src="http://widget.mixcloud.com/media/js/widgetApi.js" type="text/javascript"></script> | |
<iframe id="mixcloudPlayer" width="100%" height="120" frameborder="0" src="https://www.mixcloud.com/widget/iframe/?feed=https%3A%2F%2Fwww.mixcloud.com%2Fspartacus%2Fparty-time%2F&hide_cover=1&light=1"></iframe> | |
<script type="text/javascript"> | |
var widget = Mixcloud.PlayerWidget(document.getElementById('mixcloudPlayer')); | |
widget.getPosition().then(function(position) { | |
}); | |
</script> |