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 fetch = (...args) => console.log(...args) // mock | |
function httpRequest(url, method, data) { | |
const init = { method } | |
switch (method) { | |
case 'GET': | |
if (data) url = `${url}?${new URLSearchParams(data)}` | |
break | |
case 'POST': | |
case 'PUT': | |
case 'PATCH': |
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
<title>Parcel demo</title> | |
<!-- <link rel=stylesheet href=./style.css /> --> | |
<style> | |
body { | |
max-width: 500px; | |
margin: auto; | |
} | |
#modal_holder:empty { | |
display: none; | |
} |
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
Download new binary from nodejs.org |
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
tar -xOf FILE.tar.bz2 | psql -h HOST -U USER -d DATABASE |
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
function compileTemplate(templateElement, data){ | |
//hack to get unencoded symbols from HTML node | |
var textarea = document.createElement('textarea'); | |
textarea.innerHTML = templateElement.innerHTML; | |
var text = eval("with(data){html`" + textarea.value + "`}"); | |
var tmpElement = document.createElement('div'); | |
tmpElement.innerHTML = text; |
NewerOlder