- Generate random string from https://www.random.org/passwords/?num=5&len=12&format=html&rnd=new
- Open http://datamarket.azure.com/dataset/bing/microsofttranslator
- Click
SIGN UP - Fill detail and verify email
- Click
OKon verified page - Fill detail and accept all tos
- Open https://datamarket.azure.com/developer/applications/register
- Fill detail and use
https://127.0.0.1as redirect uri - Save
client id,client secret - Open
https://datamarket.azure.com/accountand savePrimary Account Key
| import {Directive, ElementRef, Input} from '@angular/core'; | |
| @Directive({ | |
| selector: '[background-image]' | |
| }) | |
| export class BackgroundImage { | |
| private el: HTMLElement; | |
| constructor(el: ElementRef) { | |
| this.el = el.nativeElement; |
This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.
As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).
For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
| #!/bin/bash | |
| if curl --head -sf http://yourdomain.com/some-script.php -o /dev/null; then | |
| echo "PHP FPM is up" | |
| else | |
| service php5-fpm restart && service nginx restart && service mysql restart | |
| echo "Opps .. service was down" | mail -s "PHP-FPM Service Down" [email protected] -aFrom:[email protected] | |
| fi |
| location ~* "(eval\()" { deny all; } | |
| location ~* "(127\.0\.0\.1)" { deny all; } | |
| location ~* "([a-z0-9]{2000})" { deny all; } | |
| location ~* "(javascript\:)(.*)(\;)" { deny all; } | |
| location ~* "(base64_encode)(.*)(\()" { deny all; } | |
| location ~* "(GLOBALS|REQUEST)(=|\[|%)" { deny all; } | |
| location ~* "(<|%3C).*script.*(>|%3)" { deny all; } | |
| location ~ "(\\|\.\.\.|\.\./|~|`|<|>|\|)" { deny all; } | |
| location ~* "(boot\.ini|etc/passwd|self/environ)" { deny all; } | |
| location ~* "(thumbs?(_editor|open)?|tim(thumb)?)\.php" { deny all; } |
| ## Auto-restart PHP when it's returning errors | |
| # | |
| # Make sure that http://localhost/test.php is an actual PHP script. If it starts returning | |
| # 500 errors, restart the PHP-FPM service | |
| * * * * * /usr/bin/curl --head -sf http://localhost/test.php -o /dev/null || /usr/sbin/service php5-fpm restart |
| #!/bin/bash | |
| FIND_PATH="/home/*/domains/*/public_html/" | |
| AWK_DOMAIN_POS="5" | |
| DB_NAME="" | |
| DB_USER="" | |
| DB_USER_PASS="" | |
| DOMAIN="" |
| -- Get All Category | |
| SELECT wp_terms.* FROM wp_terms, wp_term_taxonomy | |
| WHERE wp_terms.term_id = wp_term_taxonomy.term_id AND wp_term_taxonomy.taxonomy = 'category'; | |
| -- Get all Post ID within "Uncategorized" Category | |
| SELECT wp_posts.ID FROM wp_posts, wp_terms, wp_term_taxonomy, wp_term_relationships | |
| WHERE | |
| wp_terms.term_id = wp_term_taxonomy.term_id | |
| AND wp_term_taxonomy.taxonomy = 'category' | |
| AND wp_term_relationships.object_id = wp_posts.ID |