Search Results

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

Page 1/1 | 1 

  • DNS configuration to force root domain to www

    - by kolosy
    we have an app running on heroku. the dns setup is like this: A record for domain.com - heroku front end ip addresses CNAME for www.domain.com - specific host name for our app provided by heroku we also have an SSL cert for www.domain.com. the issue is that if someone goes to https://domain.com/secure_stuff, they will get heroku's SSL cert, instead of ours, causing lots of fear. We can do things on our end to make sure that all of our URLs point to https://www.domain.com, but it still won't solve this specific issue. is there a way to configure the DNS record to redirect all root domain traffic to the www subdomain?

    Read the article

  • multiple key ranges as parameters to a couchdb view

    - by kolosy
    is there a way to send multiple startKey/endKey pairs to a view, akin to the keys: [] array that can be posted for keys? the underlying problem - let's say my documents have "categories" and timestamps. if i want all documents in the "foo" category that have a timestamp that's within the last two hours, it's simple: function (doc) { emit([doc.category, doc.timestamp], null); } and then query as GET server:5894/.../myview?startKey=[foo, |now - 2 hours|]&endkey=[foo, |now|] the problem comes when i want something in categories foo or bar, within the last two hours. if i didn't care about time, i could just pull directly by key through the keys collection. unfortunately, i have no such option with ranges. what i ended up doing in the meantime is rounding the timestamp to two-hour blocks, and then multiplexing the query out: POST server:5894/.../myview keys=[[foo, 0 hours], [foo, 2 hours], [bar, 0 hours], [bar, 2 hours]] it works, but will get messy if i want to go back a large amount of time (in relationship to the blocksize)

    Read the article

  • finding an adjacent node in xml through xpath

    - by kolosy
    i have a deeply nested structure (actually parsing out xhtml, so lots of nasty), like so: <tr> <td> <font id="blah"> stuff </font> </td> </tr> <tr> <td> more stuff </td> </tr> and this repeats in a long table. i need an xpath expression that will select the second font tag (or rather it's text()). i was looking at the preceding-sibling axis, but something isn't quite working right. something along the lines of (and pardon me if this is ridiculous, my xpath is rusty) //tr[preceding-sibling::tr/td/font/b]/td/text()

    Read the article

  • numerical computation locks up ruby

    - by kolosy
    i'm trying to implement an id obfuscation scheme, with a simple hash borrowed elsewhere. i've added a method on the application helper: @@M_ID = 2**31-1 @@PRIME = 1580030173 @@PRIME_INVERSE = 59260789 # (calculated from MAXID and PRIME offline) def obfuscate_id(x) if x return ((x * @@PRIME) & @@M_ID) else x end end for some reason, whenever this is called, ruby locks up, and starts eating up disk space on my mac... like - gigs of it. any ideas?

    Read the article

1