Search Results

Search found 24 results on 1 pages for 'taw'.

Page 1/1 | 1 

  • How to make Microsoft Keyboard special keys run osascript commands on OSX?

    - by t-a-w
    I'm trying to make (1) special key open new terminal window. I bound it to file /Users/taw/bin/new_term, which contains: #!/bin/sh exec osascript -e 'tell application "Terminal" to do script "cd ."' This does the trick, except it also opens a Terminal window with this (even though Terminal.app is configured to always close windows when processes finish): Last login: Thu Mar 11 19:41:29 on ttys000 /Users/taw/bin/new_term ; exit; ~$ /Users/taw/bin/new_term ; exit; tab 1 logout [Process completed] How do I make it all work correctly? (possibly using a way different that what I've been attempting so far)

    Read the article

  • How to make Microsoft Keyboard special keys run osascript commands on OS X?

    - by t-a-w
    I'm trying to make (1) special key open new terminal window. I bound it to file /Users/taw/bin/new_term, which contains: #!/bin/sh exec osascript -e 'tell application "Terminal" to do script "cd ."' This does the trick, except it also opens a Terminal window with this (even though Terminal.app is configured to always close windows when processes finish): Last login: Thu Mar 11 19:41:29 on ttys000 /Users/taw/bin/new_term ; exit; ~$ /Users/taw/bin/new_term ; exit; tab 1 logout [Process completed] How do I make it all work correctly? (possibly using a way different that what I've been attempting so far)

    Read the article

  • How to forbid keyboard shortcut stealing by websites in Firefox

    - by taw
    Many websites, especially everything involving rich text editing (this site is guilty as well), steal keyboard shortcuts normally used to control Firefox and make them do something else instead. It is totally infuriating when I press something like Cmd-number, Cmd-L, Cmd-T, or Cmd-K and it doesn't do what I want it to. Can I make it stop? Actually, it would probably be for the best if I could forbid stealing of all Cmd-* shortcuts. I've never seen them used for anything useful. Is it possible?

    Read the article

  • How to make sure Solr/Lucene won't die with java.lang.OutOfMemoryError?

    - by taw
    I'm really puzzled why it keeps dying with java.lang.OutOfMemoryError during indexing even though it has a few GBs of memory. Is there a fundamental reason why it needs manual tweaking of config files / jvm parameters instead of it just figuring out how much memory is available and limiting itself to that? No other programs except Solr ever have this kind of problem. Yes, I can keep tweaking JVM heap size every time such crashes happen, but this is all so backwards. Here's stack trace of the latest such crash in case it is relevant: SEVERE: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3209) at java.lang.String.<init>(String.java:216) at org.apache.lucene.index.TermBuffer.toTerm(TermBuffer.java:122) at org.apache.lucene.index.SegmentTermEnum.term(SegmentTermEnum.java:169) at org.apache.lucene.search.FieldCacheImpl$StringIndexCache.createValue(FieldCacheImpl.java:701) at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:208) at org.apache.lucene.search.FieldCacheImpl.getStringIndex(FieldCacheImpl.java:676) at org.apache.lucene.search.FieldComparator$StringOrdValComparator.setNextReader(FieldComparator.java:667) at org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringCollector.setNextReader(TopFieldCollector.java:94) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:245) at org.apache.lucene.search.Searcher.search(Searcher.java:171) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:988) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:884) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:341) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:182) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)

    Read the article

  • Are default mysql parameters in RDS sane?

    - by taw
    RDS uses the same set of parameters for all instance sizes and they don't seem to be that far from defaults (max_packet_size being too small etc.) Has anyone looked at them and reviewed them for how sensible they are, especially on relatively bigger instances?

    Read the article

  • Do any clouds support SSD storage?

    - by taw
    I'm using Amazon cloud right now, and the biggest performance issue is horrible I/O performance. As long as something fits RAM it's fine - once it's too big it gets ridiculously slow (in many different scenarios). There are only so many ways one can avoid hitting disk - so the question is - does Amazon or some other cloud provide SSD option?

    Read the article

  • How to create dynamic menulets in OSX

    - by taw
    I want to put a dynamically generated icon (not static image) + possibly a tiny bit of text in OSX menu bar. If possible I'd prefer to do it from Ruby or some other convenient scripting language, but I'll deal with Objective C if that's the only way. How do I do that?

    Read the article

  • What database works well with 200+GB of data?

    - by taw
    I've been using mysql (with innodb; on Amazon rds) because it's sort of universal default, but it's been ridiculously under-performing, and tweaking it only delays the inevitable. The data is mostly relatively short (<1kB of bytes each) blobs information about 100Ms of urls. There is (or should be, mysql cannot seem to handle it) very high amount of insert / update / retrieve but few complex queries - not that complex queries wouldn't be useful, but because mysql is so slow that it's far faster to get the data out, process it locally, and cache the results somewhere. I can keep tweaking mysql and throwing more hardware at it, but it seems increasingly futile. So what are the options? SQL/relational model/etc. optional - anything will do as long as it's fast, networked, and language-independent.

    Read the article

  • Why could Shark be so slow?

    - by taw
    I'm trying to profile Ruby interpreter. I run shark -i ./ruby bm_sudoku.rb or something like that, the script finishes in less than a second, and then Shark goes to "CHUDData - Analyzing samples... 99.3%.." point and stays there frozen for 10 minutes or so. It finishes eventually, it's just so ridiculously slow it's pretty much unusable. Version I have here is OSX 10.5, shark 4.6.1 (227). Any ideas what that might be?

    Read the article

  • Enter to reliably submit html form

    - by taw
    I have a form with text input + gradient-shaded button with onclick='this.form.submit()' (plus some hidden inputs). In all browsers, clicking on the button works. In Firefox, if I click Enter while in text input, it submits the form. In IE, it does nothing. How can I make it work with IE?

    Read the article

  • What is correct content-type for excel files?

    - by taw
    I want excel files on a website to open in Excel when clicked, not get saved on desktop, or get opened embedded in a browser etc. Now obviously it all depends on how everything is configured for each user, but what's the best Content-Type and other settings to achieve just that most of the time?

    Read the article

  • Efficient most common suffix algorithm?

    - by taw
    I have a few GBs worth of strings, and for every prefix I want to find 10 most common suffixes. Is there an efficient algorithm for that? An obvious solution would be: Store sorted list of <string, count> pairs. Identify by binary search extent for prefix we're searching. Find 10 highest counts in this extent. Possibly precompute it for all short prefixes, so it doesn't ever need to look at large portion of data. I'm not sure if that would actually be efficient at all. Is there a better way I overlooked? Answers must be real time, but it can take as much preprocessing as necessary.

    Read the article

  • Is it possible to keep mysql migration running without keeping connection open?

    - by taw
    ALTER TABLE can easily take a few days - and during this time there's a non-negligible chance of connection getting terminated due to network problems. Is it possible to start ALTER TABLE (or CREATE TABLE ... SELECT ...; or some other very long running query) and leave it running without keeping connection open all the time? (the obvious solution of screen + console mysql client won't easily work as there's no ssh running on that server, only mysqld).

    Read the article

  • How to debug Perl program sudden exits?

    - by taw
    I have Perl program based on io::async, and it sometimes just exits after a few hours/days without printing any error message whatsoever. There's nothing in dmesg or /var/log either. STDOUT/STDERR are both autoflush(1) so data shouldn't be lost in buffers. It doesn't actually exit from IO::Async::Loop->loop_forever - print I put there just to make sure of that never gets triggered. Now one way would be to keep peppering the program with more and more prints and hope one of them gives me some clue. Is there better way to get information what was going on in a program that made it exit/silently crash?

    Read the article

  • How to record when user follows external links without slowing user down

    - by taw
    I want to track when user clicks external links for analytics purposes. The simplest solution is to replace all external links with links to special record-and-redirect controller, but that would slow the user unnecessarily. The second idea would be to override click event and within in $.post a message to record controller, then let the main event handler happen, which will usually be either click (open link in same tab) or middle click (open in new tab) - good either way, and the user won't have to wait for wait for my server to record it, it's fire-and-forget. (I don't care if users without Javascript don't get tracked) Is that a reasonable way to go? Or what else would be the best way to track all external link clicks?

    Read the article

  • How to make OSX application that just runs opens some file type and runs arbitrary Ruby code?

    - by taw
    It's trivial to make a program executable from shell - just put #!/usr/bin/ruby on top, chmod +x it and done. Unfortunately OSX won't let me associate file type with such scripts - it requires its .apps instead. This sort of distinction doesn't seem to exist on other operating systems. What's the simplest way of making such .app, which would merely execute some arbitrary Ruby code?

    Read the article

  • What's the simplest and most robust way to have constant-height submit button with rounded corners?

    - by taw
    Constant height so just left/right images should be necessary instead of having 4+, right? I'd still want top-to-bottom color gradient (and different one on hover). If possible, I'd prefer if it was still an <input type='submit'> and not anything weird. Is there any way (website / imagemagick script etc.) to generate these images automatically or do I need to draw them in some graphics program?

    Read the article

  • How can I debug a Perl program that suddenly exits?

    - by taw
    I have Perl program based on IO::Async, and it sometimes just exits after a few hours/days without printing any error message whatsoever. There's nothing in dmesg or /var/log either. STDOUT/STDERR are both autoflush(1) so data shouldn't be lost in buffers. It doesn't actually exit from IO::Async::Loop->loop_forever - print I put there just to make sure of that never gets triggered. Now one way would be to keep peppering the program with more and more prints and hope one of them gives me some clue. Is there better way to get information what was going on in a program that made it exit/silently crash?

    Read the article

  • Best way to have unique key over 500M varchar(255) records in mysql/innodb?

    - by taw
    I have url column with unique key over it - but its performance on updates is absolutely atrocious. I suspect that's because the index doesn't all fit in memory. So I was thinking, how about adding a column of md5(url) with 16 bytes of binary data and unique-keying that instead. What would be the best datatype for that? I'd love to be able to just see 32-character hex hash, while mysql would convert it to/from 16 binary bytes and index that, as programs using the database might have some troubles with arbitrary binary data that I'd rather avoid if possible (also I'm a bit afraid that mysql might get some strange ideas about character sets and for example overalocating storage for that by 3:1 because it thinks it might need utf8, how do I avoid that for cure?).

    Read the article

  • How do I keep website footer on bottom of the window?

    - by taw
    Coding footer naively, if there's not enough content, then there will be empty space between footer and bottom of page. I would like to get rid of this and move footer to the bottom of the window. On the other hand when there is more content, I want the content to push the footer down (so position: fixed; bottom: 0; won't do). How do I achieve this?

    Read the article

1