<div>This is stuffed into the <body></div>
<p>Also this</p>
alert("yolo"); // this gets executued
/* globals localStorage */ | |
import { onSnapshot, applySnapshot } from 'mobx-state-tree'; | |
import Storage from './storage'; | |
export const persist = (name, store, options, schema = {}) => { | |
let hydrated = false; | |
let storage = options.storage; | |
if (typeof localStorage !== 'undefined' && localStorage === storage) { |
<input | |
type="file" onChange={(e) => { | |
const file = e.target.files[0]; | |
const metadata = { | |
contentType: 'image/jpeg', | |
}; | |
const imageRef = storageRef.child(`images/${file.name}`); | |
const uploadTask = imageRef.put(file, metadata); |
import fetch from 'node-fetch'; | |
const channel = 'C03T4C7MS'; | |
const channelInfoUrl = `https://slack.com/api/channels.info?token=${token}&channel=${channel}`; | |
const userListUrl = `https://slack.com/api/users.list?token=${token}`; | |
async function fetchUsers() { | |
try { | |
let usersInChannel = await fetch(channelInfoUrl).then(res => res.json()); | |
usersInChannel = usersInChannel.channel.members; |
User.defineStatic('validate', async function validateUser(email, password) { | |
const user = await User.getAll(email, { index: 'email' }).run(); | |
if (user.length !== 1) { | |
throw new Error('No user found'); | |
} | |
if (!compare(password, user[0].password)) { | |
throw new Error('Wrong password'); | |
} | |
return true; | |
}); |
app.post('/upload', multipartMiddleware, (req, res) => { // multipartMiddleware is for multipart forms | |
console.log(req.body); | |
res.json({ | |
foo: 'bar', | |
}); | |
}); |
import Html exposing (li, text, ul) | |
import Html.Attributes exposing (class, href) | |
{-| This snippet uses the <ul> and <li> tags to create an unorderd | |
list of French grocery items. Notice that all occurrences of 'ul' | |
and 'li' are followed by two lists. The first list is for any HTML | |
attributes, and the second list is all the HTML nodes inside the | |
tag. |
<div>This is stuffed into the <body></div>
<p>Also this</p>
alert("yolo"); // this gets executued
The Expanse | |
Childhood's End | |
One Punch Man | |
The Magicians | |
Narcos | |
Jessica Jones | |
House of Cards | |
Peaky Blinders | |
Bloodline | |
Con Man |
sudo: required | |
language: node_js | |
node_js: | |
- 5.0.0 | |
services: | |
- docker | |
install: true | |
script: | |
- echo "Hey" | |
deploy: |