Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
#!/bin/bash | |
SCRIPT_VERSION=0.4.60 | |
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" | |
################################################################################# | |
#Copyright (C) 2007 Free Software Foundation. | |
#This program is free software; you can redistribute it and/or modify | |
#it under the terms of the GNU General Public License as published by |
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
var fullDate = new Date() | |
console.log(fullDate); | |
//Thu Otc 15 2014 17:25:38 GMT+1000 {} | |
//convert month to 2 digits | |
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) :(fullDate.getMonth()+1); | |
var currentDate = fullDate.getDate() + "/" + twoDigitMonth + "/" + fullDate.getFullYear(); | |
console.log(currentDate); | |
//15/10/2014 |
--- | |
######################################## | |
## Ansible Playbook for installing Nginx | |
######################################## | |
- name: check registered the repository of nginx-release | |
shell: rpm -qa | grep nginx-release | |
register: result | |
ignore_errors: True |
Lsyncd is a tool used to keep a source directory in sync with other local or remote directories. It is a solution suited keeping directories in sync by batch processing changes over to the synced directories.
So the generic use case is to keep a source directory in sync with one or more local and remote 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) |
#!/bin/bash | |
# Usage | |
# First create an encrypted password to be used as connection pass | |
# and pass as a parameter with the script. To create use: slappasswd | |
# Clean packages | |
sudo yum clean all | |
# Install openldap as service manager | |
sudo yum -y install openldap-servers openldap-clients |
yum install libmpc-devel mpfr-devel gmp-devel | |
cd /usr/src/ | |
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2 -O | |
tar xvfj gcc-4.9.3.tar.bz2 | |
cd gcc-4.9.3 | |
./configure --disable-multilib --enable-languages=c,c++ | |
make -j `grep processor /proc/cpuinfo | wc -l` | |
make install |