I hereby claim:
- I am deepaknverma on github.
- I am deepaknverma (https://keybase.io/deepaknverma) on keybase.
- I have a public key ASBh7KmGrczvx_SNO36ID8knesNM6MJX4yorNfuC6KhgKAo
To claim this, I am signing this object:
Please take a look at the original article (http://www.softwareprojects.com/resources/programming/t-optimizing-nginx-and-php-fpm-for-high-traffic-sites-2081.html) as it includes excellent configuration file examples. | |
1. Switch from TCP to UNIX domain sockets: | |
When communicating to processes on the same machine UNIX sockets have better performance the TCP because there's less copying and fewer context switches. | |
2. Adjust Worker Processes: | |
Set the worker_processes in your nginx.conf file to the number of cores your machine has and increase the number of worker_connections. | |
3. Setup upstream load balancing: | |
Multiple upstream backends on the same machine produce higher throughout than a single one. |
/* | |
Sample Output | |
0 2 0 2 0 0 1 0 1 2 1 0 1 1 0 0 2 0 1 0 1 2 1 1 1 3 0 2 0 0 | |
2 0 3 3 1 0 0 0 0 2 2 1 1 1 2 0 2 0 1 0 1 0 0 1 0 0 2 1 0 1 | |
1 1 0 1 0 1 0 2 1 3 2 0 0 2 1 2 1 0 2 2 1 2 1 2 1 1 2 2 0 3 | |
2 1 1 0 1 1 1 0 2 2 | |
Explanation | |
The output states that 0 appears 0 times, 1 appears 2 times, | |
2 appears 0 times, and so on in the given input array. | |
*/ |
One of the biggest challenges I run into working with ESXi hosts is the lack of a real usable CLI. The remote CLI provided by VMware is clunky at best and makes administration a bit of a pain. I did some poking around and managed to find some interesting CLI commands that work for ESXi. | |
Most of these have no manual page but will output a help message if run by themselves. I would recommend using extreme caution and using a test host to determine the usefulness in your environment before using them on an important system. Also keep in mind that the examples that I give are not the "only" way the commands can be used. | |
To power on a virtual machine from the command line: | |
- Lists all vm's running on hypervisor and provides vmid | |
vim-cmd vmsvc/getallvms | |
replace 503 with your keyword | |
tail -f /var/log/apache2/access.log | perl -pe 's/ 503 /\e[1;31;43m$&\e[0m/g' | |
sudo bash -c 'tail -f /var/log/apache2/access.log| grep "[0-9] 5[0-9][0-9] \"" | (while read; do date; /usr/local/sbin/profile-php; done)' |
I hereby claim:
To claim this, I am signing this object:
Your privacy is important to us. It is Netbeam Technologies' policy to respect your privacy regarding any information we may collect from you through our app, raisingthechild.
We only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.
We only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorised access, disclosure, copying, use or modification.
We don’t share any personally identifying information publicly or with third-parties, except when required to by law.
Starting with git version 1.7.3 it became possible to pass a strategy option to git rebase command.
The use of -Xtheirs and -Xours appear to be somewhat counterintuitive, so think of it as telling git which branch code to favor when resolving rebase conflicts. For example, when doing
# see current branch
$ git branch
---
* branch-a
...
{ | |
"accountId" : 12345, | |
"sfId" : "sf0000234562553", | |
"url": "https://abc.local" | |
} |
let getPaths = (object) => { | |
var result = []; | |
// Can't pass null here | |
if (object === null) { | |
return; | |
} | |
// Creating local array | |
if(!currentVal) { | |
var currentVal = []; | |
} |
/* | |
Sample Input 0 | |
7 11 | |
5 15 | |
3 2 | |
-2 2 1 | |
5 -6 | |
Explanation: | |
The first line contains two space-separated integers denoting the respective values of s and t. |