This sheet goes along with this SSH YouTube tutorial
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
.next | |
public | |
node_modules | |
yarn.lock | |
package-lock.json | |
**/*.test.js | |
coverage |
yarn add next react react-dom | |
yarn add --dev @types/react @types/react-dom |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-l | |
RewriteRule . /index.html [L] |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
<!-- using semantic ui to display flags --> | |
<div class="field"> | |
<label>Country</label> | |
<div class="ui fluid search selection dropdown"> | |
<input type="hidden" name="country" value=""> | |
<i class="dropdown icon"></i> | |
<div class="default text">Select Country</div> | |
<div class="menu"> | |
<div class="item" data-value="64"><i class="nz flag"></i>New Zealand (+64)</div> | |
<div class="item" data-value="61"><i class="au flag"></i>Australia (+61)</div> |
Below are many examples of function hoisting behavior in JavaScript. Ones marked as works
successfuly print 'hi!' without errors.
To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js
(I may be using incorrect terms below, please forgive me)