sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/dont-prompt-$USER-for-password |
<?php | |
echo 'default locale: ' . \Locale::getDefault(); | |
echo PHP_EOL; | |
echo 'default timezone: ' . \date_default_timezone_get(); | |
echo PHP_EOL; | |
// see http://tools.ietf.org/html/rfc3339#section-5.8 for example datetimes | |
// bug report on missing fractions support: https://bugs.php.net/bug.php?id=51950 | |
// feature request for fractions support in constructor: https://bugs.php.net/bug.php?id=49779 |
const asyncCompose = (…functions) => input => functions.reduceRight((chain, func) => chain.then(func), Promise.resolve(input)); | |
const asyncPipe = (…functions) => input => functions.reduce((chain, func) => chain.then(func), Promise.resolve(input)); |
$ sudo -u postgres psql | |
psql (11.2 (Ubuntu 11.2-1.pgdg16.04+1)) | |
Type "help" for help. | |
postgres=# CREATE USER database_name CREATEDB ENCRYPTED PASSWORD 'CHANGE_ME'; | |
Список ролей(пользователи) | |
postgres=# \dg; | |
Role name | Attributes | Member of | |
-----------------+------------------------------------------------------------+----------- |
RewriteEngine On | |
# If an existing asset or directory is requested go to it as it is | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d | |
RewriteRule ^ - [L] | |
# If the requested resource doesn't exist, use index.html | |
RewriteRule ^ /index.html |
if __name__ == '__main__': | |
app.run(host="0.0.0.0", port=8080, ssl_context=('/etc/letsencrypt/live/<DOMAIN>/fullchain.pem', '/etc/letsencrypt/live/<DOMAIN>/privkey.pem')) |
#!/bin/bash | |
public='/var/www/html/'$1; | |
pwd=$(pwd); | |
sudo ln -s $pwd $public | |
echo '✔ Проект успешно опубликован в: '$public; |
# watch file | |
tsc -w --outDir ./build "test.ts" |
var myDate = new Date(); | |
//add a day to the date | |
myDate.setDate(myDate.getDate() + 1); | |