Search Results

Search found 4 results on 1 pages for 'talentedmrjones'.

Page 1/1 | 1 

  • With a node.js powered server on EC2, how can I decrease the TCP connection time?

    - by talentedmrjones
    While profiling my application I've noticed that in the Firebug Net panel, the "Connecting" time—that is the time waiting for a TCP connection—is consistently around 70–100ms. See image below: Of course in the grand scheme of things, 100ms is not long, but I have seen other services that respond with 0ms Connect time. So if other servers can, I should be able to as well. Any thoughts on how I might even beging to troubleshoot this?

    Read the article

  • Preg_match class name from PHP file

    - by talentedmrjones
    I have a script that recursively scans a directory pulling out class names from php files, and storing those classes names in an array. This is working nicely even through the rather large Zend Framework library folders. The issue is that classes that extend other classes are not being included in the array. Here is my current preg_match: if (preg_match("/class\s*(\w*)\s*\{/i",strip_comments(file_get_contents($file)),$matches)) $classes[] = $matches[1]; I know that the last \s* is not right; there should be something there that can catch "{" or " extends Some_Other_Class {" .

    Read the article

  • Subversion commands not being run by Ubuntu rc.local

    - by talentedmrjones
    Here is my rc.local for an autoscaling amazon ec2 instance based on ubuntu: (Note that user names, domains, and paths have been changed for security purposes) logger "Begin rc.local startup script:" logger "svn checkout" sudo -u nonRootUser /usr/bin/svn co svn+ssh://[email protected]/path/to/repo /var/www/html | logger logger "chown writeable folder" chown www-data /var/www/html/writeableFolder logger "restart apache" /etc/init.d/apache2 restart | logger exit 0 And here is the output of sudo tail -n 40 /var/log/syslog Mar 10 22:05:20 ubuntu logger: Begin rc.local startup script: Mar 10 22:05:20 ubuntu logger: svn checkout Mar 10 22:05:20 ubuntu logger: chown writeable folder Of course its not getting to apache2 restart because it error'd on the chown. I did find however that if I do a checkout beforehand, and set the rc.local svn command to an svn update, that it still does not run the svn command but does output apache2 restart successfully. These same svn commands work perfectly when I run them manually, tho it's strange that within rc.local they do not produce any output whatsoever to logger yet apache2 restart does. I've also tried running the svn co and svn update both with sudo -u and without. How do I get the svn command to run? Either a full checkout or an update. At this point either would be better than nothing!

    Read the article

  • Are these REST HTTP response codes right, and what about the Content-Type?

    - by talentedmrjones
    I'm writing a controller helper that sets the proper response headers for my REST controller action. It's pasted below and should be simplified enough for those who aren't familiar with Zend Framework to understand what I'm doing. My question is: Are these codes correct for their respective responses, and in the case of "access denied" do I use a 401 or 403? Also, in case of responding with an error, I understand I should be placing a message in the response body, but should I set the "Content-Type" to "text/plain"? <?php class App_Controller_Helper_RestResponse extends Zend_Controller_Action_Helper_Abstract { public function denied() { // 403 or 401? } public function notFound() { // 404 } public function created() { // 201 } public function deleted() { // 204 } public function redirect() { // 301 // new url } public function malformed() { // 400 } public function gone() { // 410 } }

    Read the article

1