Activates a service immediately:
systemctl start foo.serviceDeactivates a service immediately:
| # Get youtube id | |
| #http://youtu.be/5Y6HSHwhVlY | |
| #http://www.youtube.com/embed/5Y6HSHwhVlY?rel=0 | |
| #http://www.youtube.com/watch?v=ZFqlHhCNBOI | |
| regex = re.compile(r'(https?://)?(www\.)?(youtube|youtu|youtube-nocookie)\.(com|be)/(watch\?v=|embed/|v/|.+\?v=)?(?P<id>[A-Za-z0-9\-=_]{11})') | |
| match = regex.match(self.youtube_url) |
| [ | |
| { | |
| "action": "talk", | |
| "text": "Hey there! Welcome to Ford Mustang Romania conference line", | |
| "voiceName": "Kimberly" | |
| }, | |
| { | |
| "action": "conversation", | |
| "name": "ford-mustang-romania" | |
| } |
| package main | |
| import ( | |
| "bytes" | |
| "code.google.com/p/go.crypto/openpgp" | |
| "encoding/base64" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| ) |
| # How to sign your custom RPM package with GPG key | |
| # Step: 1 | |
| # Generate gpg key pair (public key and private key) | |
| # | |
| # You will be prompted with a series of questions about encryption. | |
| # Simply select the default values presented. You will also be asked | |
| # to create a Real Name, Email Address and Comment (comment optional). | |
| # | |
| # If you get the following response: |
| ## | |
| # WHOIS servers for new TLDs (http://www.iana.org/domains/root/db) | |
| # Current as of 2016-10-07 | |
| ## | |
| \.aarp$ whois.nic.aarp | |
| \.abarth$ whois.afilias-srs.net | |
| \.abbott$ whois.afilias-srs.net | |
| \.abbvie$ whois.afilias-srs.net | |
| \.abc$ whois.nic.abc |
| """ | |
| Requeriments: | |
| $ sudo pip install boto dnspython | |
| Edit ~/.boto to use your AWS credentials | |
| """ | |
| import time | |
| import sys |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#MongoDB 3.2.x Replica Sets on AWS EC2 A MongoDB replica set provides a mechanism to allow for a reliable database services. The basic replica set consists of three servers, a primary, a secondary and an arbitrator. The primary and secondary both hold a copy of the data. The arbitrator is normally a low spec server which just monitors the other servers and help with the failover process. In production, there can be more than three servers.
To setup mongo as a replica set on Amazon Web Services EC2 you need to first setup a security group with ssh on port 22 and mongodb on port 27017. You then need to create three servers. Select Ubuntu 14.04 LTS x64 and a micro (or bigger depending on your database size, ideally you should have enough memory to match your database size) instance for the primary and secondary and a nano instance for the arbitrator.
##Adjust the File System on each Server The operating system by default will update the last access time on a file. In a high data throughput database application
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.