http://twitter.com/share?text=<TITLE>&url=<URL>
E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com
http://www.facebook.com/sharer.php?u=&p[title]=
// Only using native browser features (no jQuery). | |
// Uses `fetch`, `DOMParser` and `querySelectorAll`. | |
const getTitle = (url) => { | |
return fetch(`https://crossorigin.me/${url}`) | |
.then((response) => response.text()) | |
.then((html) => { | |
const doc = new DOMParser().parseFromString(html, "text/html"); | |
const title = doc.querySelectorAll('title')[0]; | |
return title.innerText; |
#!/bin/sh | |
projectname=$1; | |
# sh deploy-node [name] | |
cd /var/www; | |
mkdir $projectname; | |
cd $projectname; | |
touch ".env"; | |
touch ".env"; | |
mkdir builds; |