Search Results

Search found 12 results on 1 pages for 'piquadrat'.

Page 1/1 | 1 

  • How do I disable mouse magnet on middle edge with multi monitors?

    - by piquadrat
    I use Ubuntu 12.04 on a two screen setup. Multiscreen on 12.04 has generally become much better, but there is one thing that really gets on my nerves: there's a mouse magnet of sorts on the middle edge (between the two screens). It's undoubtedly there to make it easier to interact with the launcher on the right screen. But I have enough trust in my mousing skills, the magnet is more annoying than helpful in my case. Can I disable it somehow?

    Read the article

  • Enable basic auth sitewide and disabling it for subpages?

    - by piquadrat
    I have a relatively straight forward config: upstream appserver-1 { server unix:/var/www/example.com/app/tmp/gunicorn.sock fail_timeout=0; } server { listen 80; server_name example.com; location / { proxy_pass http://appserver-1; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; auth_basic "Restricted"; auth_basic_user_file /path/to/htpasswd; } location /api/ { auth_basic off; } } The goal is to use basic auth on the whole website, except on the /api/ subtree. While it does work with respect to basic auth, other directives like proxy_pass are not in effect on /api/ as well. Is it possible to just disable basic auth while retaining the other directives without copy&pasting everything?

    Read the article

  • Access port on machine by connecting to other machine via SSH?

    - by piquadrat
    I have to access my home router's web interface on port 80. Unfortunately, the only way into the network I have at the moment is SSH to another machine on the same network. me ---|---SSH Box----Home Router My Google foo seems to have abandoned me, I couldn't didn't find anything helpful. Any ideas? Thanks! To clarify: I'm not at home right now. I do however have access to one machine on the network (a QNAP NAS) over SSH. I need to access the home router web interface on port 80 from my notebook which is outside of the home network.

    Read the article

  • Facebook Like-Button - hide count?

    - by piquadrat
    In the setup dialog for the Like-Button, there are only two options for layout: Unfortunately, the numbers for the website of my employer is nowhere near 22'000, so the powers that be have decided that we should not show the number of "likes" until said number is a little more in our favour. As far as I know, I don't have access to the layout of the button through Javascript or CSS (it's in an iframe served by facebook). Are there any other ways to hide the count?

    Read the article

  • Get stacktrace from stuck python process

    - by piquadrat
    I have to run a legacy Zope2 website and have some grievance with it. The biggest issue is that, occasionally, it just locks up, running at 100% CPU load and not answering to requests anymore. While the problem isn't reproducible on a regular basis, one page containing 3 dynamic graphs triggers it sometimes, so I suspect some kind of race condition that leads to an endless loop or a stuck busywait. The problem is, I have not yet found a way to debug this thing. There's nothing in the Zope logs and nothing in the system logs. I tried the suggestions from this question to get a stacktrace, but the only signal that has any effect is SIGKILL. Is there another possibility to find out where exactly the process is when it gets stuck?

    Read the article

  • pip requirements.txt with alternative index

    - by piquadrat
    I want to put all the requirements of a repoze Zope2 install in a pip requirements file. Most of the repoze packages don't seem to be on PyPi, but there's an alternative PyPi index for them here. But I can't figure out how to tell pip to use that index together with a requirements file. For single packages, it's easy pip install zopelib -i http://dist.repoze.org/zope2/2.10/simple/ I tried the following pip install -r requirements.txt -i http://dist.repoze.org/zope2/2.10/simple/ or in my requirements.txt all kind or permutations of these: zopelib -i http://dist.repoze.org/zope2/2.10/simple/ zopelib --index http://dist.repoze.org/zope2/2.10/simple/ -i http://dist.repoze.org/zope2/2.10/simple/ zopelib or (because the documentation says "Note that all these options must be on a line of their own.") --index http://dist.repoze.org/zope2/2.10/simple/ zopelib So, what's the correct way of telling pip to use http://dist.repoze.org/zope2/2.10/simple/ as index?

    Read the article

  • Django and conditional aggregates

    - by piquadrat
    I have two models, authors and articles: class Author(models.Model): name = models.CharField('name', max_length=100) class Article(models.Model) title = models.CharField('title', max_length=100) pubdate = models.DateTimeField('publication date') authors = models.ManyToManyField(Author) Now I want to select all authors and annotate them with their respective article count. That's a piece of cake with Django's aggregates. Problem is, it should only count the articles that are already published. According to ticket 11305 in the Django ticket tracker, this is not yet possible. I tried to use the CountIf annotation mentioned in that ticket, but it doesn't quote the datetime string and doesn't make all the joins it would need. So, what's the best solution, other than writing custom SQL?

    Read the article

  • In-browser HTML editor for tables?

    - by piquadrat
    I'm developing a website that publishes scientific articles, not as PDF but as HTML. As a input tool for the editorial team, we use TinyMCE for normal text plus a couple of custom plugins for footnotes and citations. But we are not really happy with TinyMCEs table controls. Everything but the most simple tables take way to long to write. Are there any specialized table editing tools for the browser out there?

    Read the article

  • etree.findall: 'OR'-lookup?

    - by piquadrat
    I want to find all stylesheet definitions in a XHTML file with lxml.etree.findall. This could be as simple as elems = tree.findall('link[@rel="stylesheet"]') + tree.findall('style') But the problem with CSS style definitions is that the order matters, e.g. <link rel="stylesheet" type="text/css" href="/media/css/first.css" /> <style>body:{font-size: 10px;}</style> <link rel="stylesheet" type="text/css" href="/media/css/second.css" /> if the contents of the style tag is applied after the rules in the two link tags, the result may be completely different from the one where the rules are applied in order of definition. So, how would I do a lookup that inlcudes both link[@rel="stylesheet"] and style?

    Read the article

  • jQuery: change content of <option> elements

    - by piquadrat
    I have a select widget with a couple of AJAX enhancements. <select id="authors"> <option value="1">Foo Bar</option> <option value="2" selected="selected">Bar Baz</option> </select> Now, if the selected option changes, I want to change the "content" ("Foo Bar" and "Bar Baz" in the example). How can I do that with jQuery? I tried the following, but obviously, it doesn't work. $('#authors').change(function(){ $('#authors option[selected=selected]').html('new content'); }); /edit: to clarify, the selector '#authors option[selected=selected]' works fine, it selects the correct option DOM element. But .html('new content') does nothing. 2nd edit: OK, this is embarassing. I tried my code in Chrome's JavaScript console, where it didn't have any effect. After jAndy clearly demonstrated that it works in jsFiddle, I tried it in the FireBug console, and there it works. Lesson learned :-)

    Read the article

  • How to make Universal Feed Parser only parse feeds?

    - by piquadrat
    I'm trying to get content from external feeds on my Django web site with Universal Feed Parser. I want to have some user error handling, e.g. if the user supplies a URL that is not a feed. When I tried how feedparser responds to faulty input, I was surprised to see that feedparser does not throw any Exceptions at all. E.g. on HTML content, it tries to parse some information from the HTML code, and on non-existing domains, it returns a mostly empty dictionary: {'bozo': 1, 'bozo_exception': URLError(gaierror(-2, 'Name or service not known'),), 'encoding': 'utf-8', 'entries': [], 'feed': {}, 'version': None} Other faulty input manifest themselves in the status_code or the namespaces values in the returned dictionary. So, what's the best approach to have sane error checking without resorting to an endless cascade of if .. elif .. elif ...?

    Read the article

  • SEO, ordering and duplication of content

    - by piquadrat
    I run a specialized news site and am trying to apply a little bit of SEO sauce to it. One of the most important things I hear is to avoid duplication of content. I've covered all the basics but I'm stuck with ordering of content. As an example, the archive of the site is orderable by date, views, and rating. Since we don't have that many news items, an archive page for a particular day has usually only a couple of items, so the following URLs all have the same content, albeit in different ordering: /news/archive/2010/05/16/ /news/archive/2010/05/16/?o=views /news/archive/2010/05/16/?o=rating Do search machines penalize this particular kind of duplication of content? And if yes, what's the best way to avoid said penalty? <link rel="canonical" />? Tell Google & Co. to ingore the o parameter? Marking the ordering links with nofollow? Only allow the indexation of the date-ordered archive sites through robots.txt (not sure if this is even possible)?

    Read the article

1