System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
In this guide, I will show you how to make a Linux Mail Server in fast and easy way. This guide was taken from tiq's tech-blog for recent version, Linux distro I using is Ubuntu 20.04 LTS
Make sure you have Certificate and Key file ready to use.
You can use existing Web Server SSL certificate, since we going to use same domain, example.com
.
If you plan to use mx.example.com
or mail.example.com
you need create another one for these.
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse | |
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse | |
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse | |
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse | |
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse | |
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse | |
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse |
[ | |
"aol.com", | |
"att.net", | |
"comcast.net", | |
"facebook.com", | |
"gmail.com", | |
"gmx.com", | |
"googlemail.com", | |
"google.com", | |
"hotmail.com", |
#!/bin/bash | |
#Script that can clone a given volume | |
#Verify user entered arguments | |
if [ "$1" = "" ] | |
then | |
echo "Provide a source volume name that needs to be cloned" | |
exit | |
fi |
Full documentation is here: https://github.com/videolan/vlc/tree/master/share/lua/http/requests
Set http password in VLC first, then open: http://localhost:8080/
Get the playlist: http://localhost:8080/requests/playlist.json
Get the player status:
var pubListener = 'tcp://127.0.0.1:5555'; | |
var subListener = 'tcp://127.0.0.1:5556'; | |
var hwm = 1000; | |
var verbose = 0; | |
// The xsub listener is where pubs connect to | |
var subSock = zmq.socket('xsub'); | |
subSock.identity = 'subscriber' + process.pid; | |
subSock.bindSync(subListener); |
Install Supervisor with sudo apt-get install supervisor
in Unix or brew install supervisor
in Mac OSX. Ensure it's started with sudo service supervisor restart
in Unix or brew services start supervisor
in Mac OSX.
In Unix in /etc/supervisord/conf.d/
create a .conf
file. In this example, laravel_queue.conf
(contents below). Give it execute permissions: chmod +x laravel_queue.conf
.
In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini
and in /usr/local/etc/supervisor.d/
create a .conf
file. In this example, laravel_queue.conf
(contents below). Give it execute permissions: chmod +x laravel_queue.conf
.
This file points at /usr/local/bin/run_queue.sh
, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh
.
Now update Supervisor with: sudo supervisorctl reread
in Unix and with: brew services restart supervisor
in MAc OSX . And start using those changes with: sudo supervisorctl update
.
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', | |
'operators' => ['=>' => null] |