Effectively an easy way to call setTimeout()
from within an async function.
note: This will only wait at least this many ms before execution continues.
const sleep = ms => new Promise(res => setTimeout(res, ms));
// Usage
/** | |
* @author qiao / https://github.com/qiao | |
* @author mrdoob / http://mrdoob.com | |
* @author alteredq / http://alteredqualia.com/ | |
* @author WestLangley / http://github.com/WestLangley | |
* @author erich666 / http://erichaines.com | |
*/ | |
// This set of controls performs orbiting, dollying (zooming), and panning. | |
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). |
@mixin simpleSpace { | |
// margin and padding values | |
$spacings: ( | |
0, | |
.25rem, | |
.5rem, | |
1rem, | |
1.5rem, | |
2rem, |
#cloud-config | |
package_update: true | |
package_upgrade: true | |
packages: | |
- nginx | |
- git | |
users: | |
- name: xander |
#!/bin/bash | |
# Note: to change user password - sudo passwd USERNAME | |
# Check if root | |
# To run command as current user: sudo -u $curr_user | |
if ! [ $(id -u) = 0 ]; then | |
echo "Server Setup needs to be run as root." >&2 | |
exit 1 | |
else |