I've been playing around with the Varnish cache server and I got my webpage up lightning fast, it gets 97 Points in Google's Pagespeed and 100 @ Pingdom's. I used Varnish (proxies to nginx), NGINX (only locally available, proxies *.php to php-fpm (but I think about moving to HipHop PHP Compiler)).  So as my page was  fast and only ~500/1GB of Ram were used I asked a friend of mine to perform a stress test on this machine's HTTP server. I've configured the following Anti-DDoS-mechanisms:   iptables Firewall limiting Connections / second some more iptables checks (Sessions starting with a SYN, ICMP and so on) Varnish caching Re-coded the small webpage to store some values that may be fetched often in the alternate php cache (i.e.: the currently playing song, ttl of 120 should be fine)   There is no dynamic data on the webpage except for the currently playing song which is APC-powered, and definetly no need for sessions.  So now to my problem, my friend started a DoS attack from some machine he was authorized to use and my server went down VERY fast. I was umable to get on SSH so I used a serial console and checked the varnishd logs, which showed: session start session end  And this repeating all the time. I took advance of my console access and banned the IPs, ê voila my page was back.  Now since there is no need for session I need the VCL Syntax for prohibiting all sessions except for scripts in the subdir /user.
This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?
What are the scope restrictions for setting shopt extglob. and other options? My non-interactive bash shell has extglob off. I would like to turn it on in the statement immediately before a command, but I have noticed that when shopt -s extglob is within an if .. then .. else block, it somehow does not register.   The following extglob-dependant command is not valid: syntax error near unexpected token '('.     Where can extglob be set, and why is there a restriction, at all? Does this apply to other options?  ... GNU bash 4.1.5     This works:    shopt -s extglob if true ;then     touch a.bcd; ls a.@(bcd) fi   This fails:    if true ;then     shopt -s extglob     touch a.bcd; ls a.@(bcd) fi ... line 17: syntax error near unexpected token `(' ... line 17: `touch a.bcd; ls a.@(bcd)' I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&amp;@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;@#\/%=~_|])/i;     return text.replace(exp,"&lt;a href='$1'&gt;$1&lt;/a&gt;");  } Move rigidbody using WASD keys but rotate it based on camera/mouse movement I am very new to unity and my scripts are based on some scripts found on the web.   I want to make a first person view so the camera is attached to my rigidbodys head. Then i want to move my rigidbody based on keyboard input (wasd) and rotate it using the mouse movement.  Until now, i used the following code for moving my rigidbody:  void Update() {      /* calculate rigidbody movement */     movement = new Vector3( Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical")).normalized;      /* calculate mouse look to rotate the rigidbody*/     mouseDelta = new Vector2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y"));     mouseDelta = Vector2.Scale(mouseDelta, new Vector2(sensitivity * smoothing, sensitivity * smoothing));     smoothV.x = Mathf.Lerp(smoothV.x, mouseDelta.x, 1f / smoothing);     smoothV.y = Mathf.Lerp(smoothV.y, mouseDelta.y, 1f / smoothing);     mouseLook += smoothV;  }  void FixedUpdate() {         /* apply rigidbody movement from Update() */     transform.Translate( movement * moveSpeed * Time.deltaTime );             /* apply rigidbody rotation from Update() */     transform.localRotation = Quaternion.AngleAxis(mouseLook.x, transform.up);             /* apply camera rotation from Update() */     Camera.main.transform.localRotation = Quaternion.AngleAxis(-mouseLook.y, Vector3.right);    }   I learned today that i dont have to move a rigidbody's transform but now i am totally confused and it seems i have to restart my whole (first!) project.  So when i use MovePosition and MoveRotation, how do i rotate it based on the camera perspective/mouse movement?  I think the movement Vector is ok so i can simply rewrite the FixedUpdate to something like  rigidbody.MovePosition(movement * speed * Time.deltaTime)   but i am totally stuck on how to apply the camera rotation to my rigidbody to use it like  void FixedUpdate() {      /* move the rigidbody */                rigidbody.MovePosition(movement * moveSpeed * Time.deltaTime);     /* rotate the camera */     camera.transform.localRotation = Quaternion.AngleAxis(-mouseLook.y, Vector3.right);      /* but how can i rotate the rigidbody based on the cameras rotation??? */     rigidbody.MoveRotation(?????);  }   I hope its clear what i want, thank you! Requirements for a clan war? I am currently in a clan with three members. When we tried to initiate a clan war it said we had insufficient clan requirements. Does anyone know what the full requirements are? Is there a minimum clan member requirement? How does the simulation hypothesis relate to the ethics of simulated violence? Say, for the sake of this question,  is real. Are we then hurting "persons"/conscious beings in "our simulations" - video games - when we fight them? Why (not)? If so, is this unethical? Think for example about shooting an alien in the game No Man's Sky.  Edit/answer on the comment of Joseph Weissman: My reasoning is like this:   It is unethical to harm a person (with a person being everything that has ). By the simulation hypothesis (assuming it's true), everything around us (everything that we know of), is simulated. By 1 and 2, all persons we know of are simulated. So it's unethical to harm the simulated persons around us. A game is a simulation just like we are in a simulation, so the game has simulated persons. Therefore -  - it's unethical to harm the persons in a video game.   I know that the premises - besides the simulation hypothesis itself - are debatable, but that's the reason I asked the question in the first place.  I was also thinking that the characters in the video game differ because they have far less to no intelligence, that much of it is scripted. But I neither have a proof that we ourselves aren't scripted, with free will being an illusion. Also, how intelligent does a character in a simulation/video game has to be to have personhood then? I think this is a case of the .  Just to be sure, please note that this question is not about whether the simulation hypothesis is true or how likely it is to be true. It is about (one of the) consequences if the simulation hypothesis is true. It's also not a question about violence in games in general. I'm using Ubuntu 17.10 with GNOME shell and Numix-Circle icon theme.   When I hover over the Numix icon for Nightly Web Browser, which is pinned to the dock I get the title "Nightly Web Browser".      But when I launch the program, another icon pops up at the bottom, with the name "Nightly". Running Yosemite 10.0 with a clean erase and install, when I reboot, all my launchpad apps are totally disorganised, folders and un-official apps disappears...  After reorganizing the layout twice, I don't want to keep sorting my launchpad every time I restart my Mac. what is PGP public key block? There's PGP public key block posted on some websites (eg. ).  It's not hex code. it uses much more alphabet characters. What is it?  Why is this information posted? how can i use it? Is $\sin \infty$ an indeterminate form? I had a  over what seems like a simple question:     Is $\sin \infty$ an ?   What do you think? :)    I'm labelling this as (soft-question) to be safe, but it should have a clear answer depending on the definition of indeterminate form used. The term "indeterminate form" is seldom used in post-calculus mathematics, but I believe it has one or more accepted definitions, which are either informal or formal. So any answer which takes a standard definition and argues the case would be interesting to me.  How to make a good answer:   State the definition of indeterminate form, either from an online or textbook source, or a definition you came up with on your own. Determine, using your stated definition, whether $\sin \infty$ is indeterminate or not.   EDIT: What do I mean by $\sin (\infty)$?  It's not a well-defined expression, but neither are any of the other indeterminate forms: $\frac{0}{0}$ doesn't exist, $1^\infty$, doesn't exist, and so on. So the question is whether this expression -- which is not well-defined, just like any other indeterminate form -- is an indeterminate form. Can you fly over a Medium enemy creature in a 10ft tall corridor? What is the best way to deal with very complex forms? I'm trying to give the best experience to users of a very huge system (like a CRM). It has a lot of forms and much of these have a lot of fields. My doubt is about if I should use a single column form (which raises too much vertical scrolling), or a two columns form (which needs less vertical scrolling and uses more horizontal white space) and a last one with four columns (which has few scrolling and uses almost whole white space to try to keep most of the fields above the fold).  It's important to say that our clients hate scrolling, and they always ask why we don't use the horizontal white space when we present a one column form).  So I'm little bit confused about it, because a lot of UX studies and good practices recommend to do not use/avoid multicolumn forms but the clients most of times ask multi column forms.  Our clients are very used to desktop programs and not everybody is very familiar with web based systems.  Below follows some possibilities I would like to share to illustrate an example of a complex form in the system with the three possibilities I mentioned:    In the example above I'm using the one column form (most recommended in UX studies), but with a very long vertical scroll.    In the second example I tried to reduce vertical space by using two columns.    This is the client's favorite one, 4 columns using white space and trying to keep everything above the fold.   The lengths of fields are based on the average of characters amount for each field.   I would like to know your opinion about the best approach to this case. Each  has a compiled cost that contributes towards the  compiled character formula limit.  What are the current compiled costs associated with each formula function? My site has 30,000 visits with 86,000 page views. If the bounce rate of 54%, then does it means only 15,000 users generated the 86,000 page views or 30,000 visits generated the 86,000 page views.  My website is www.cricandcric.com  Even though I have got 86,000 page views, my site's Alexa ranking is still getting worse day by day. How do I control that? Can we create a subsection of the References Cited section with different reference numbering? I need to add some more publications. I do not want to change the previous reference numbers, so I need to create new citations with difference reference numbering like [p1], [p2], etc. Can LaTeX do that? What regression model is the most appropriate to use with count data? I am trying to get a little into statistics, but I am stuck with something.  My data are as follows:  Year   Number_of_genes 1990          1 1991          1 1993          3 1995          4   I now want to build a regression model to be able to predict the number of genes for any given year based on the data. I did it with linear regression until now, but I have done some reading and it does not seem to be the best choice for this kind of data. I have read that Poisson regression might be useful, but I am unsure what to use. So my question is:  Is there a general regression model for this kind of data? If no, what do I have to do to find out which method is the most  appropriate to use ( in terms of what I have to find out about the data)? How to use HttpWebRequest (.NET) asynchronously? How can I use HttpWebRequest (.NET, C#) asynchronously? If dark matter only interacts with gravity, why doesn't it all clump together in a single point? I'm a complete layperson. As I understand, dark matter theoretically only interacts with the gravitational force, and doesn't interact with the other three fundamental forces: weak nuclear force, strong nuclear force, and electromagnetism.  Those are my understandings going in. If I'm wrong, please correct me. I've done some googling, and I haven't found anything confirming or denying that dark matter is affected by either of the fundamental nuclear forces.  So since dark matter only interacts with gravity, what causes any dark matter particle to be repelled from another? If they can pass freely through each other, and they are gravitationaly attracted to each other, why don't such particles clump together in a single 'point' in space?   It seems to me that particles occupying a single 'space' are philosophically not distinct particles, but I don't know how actual physics would play into this.  Edit , author's credentials unknown, but implicitly claims to be a physicist or astronomer, says "...[P]hysicists generally take all dark matter to be composed of a single type of particle that essentially interacts only through gravity."  Edit 2 The author is this , "Professor of Science on the physics faculty of Harvard University." How to alter touchpad settings on Ubuntu GNOME 16.04? After upgrading to Ubuntu GNOME 16.04 with GNOME 3.20 I have found that if I tap my touchpad it clicks which is something I do not want due to a faulty touchpad, previously I was able to disable this through the gnome-control-center, but seemingly there is no way to do this any more through there, so how do I do it? Also, even though it is set to false in gsettings and the dconf-editor seemingly for some reason somewhere in the system it is also set to true as it is behaving as such. I am also unable to set natural scrolling or any of the other touchpad settings seemingly, why not? Evaluating the limit of a sequence given by recurrence relation $a_1=\sqrt2$, $a_{n+1}=\sqrt{2+a_n}$. Is my solution correct? Alternative Method to Acquire El Capitan Upgrade