Archive for April, 2011

links for 2011-04-27

Wednesday, April 27th, 2011

links for 2011-04-26

Tuesday, April 26th, 2011

links for 2011-04-25

Monday, April 25th, 2011

links for 2011-04-22

Friday, April 22nd, 2011

links for 2011-04-18

Monday, April 18th, 2011

links for 2011-04-16

Saturday, April 16th, 2011
  • "Refinery generates a Rails Engine for each type, which means that all the controller, model, and view files are actually in your vendor/engines directory and accessible to you (although they do require a development server restart when you change them…) However, a lot of the default CRUD behavior is defined by Refinery in the refinerycms-core gem via the Refinery crudify method, so if you want to change some default behaviors, you either need to look up and copy the existing Refinery behavior, or try and implement your new behavior as a before filter (preferred, if possible).

    If you want to extend one of the existing Refinery models, most notably Page or User, you can re-open them to monkey patch in your app, but it took us a few tries to learn the magic require statement:

    require Refinery::Pages::Engine.config.root + 'app' + 'models' + 'page'
    "

  • "This system acts as a regular expression generator. Instead of trying to build the regular expression, you start off with the string that you want to search. You paste this into the site, click submit and the site finds recognisable patterns in your string. You then select the patterns that you are interested in and it writes a fully fledged program that extracts those patterns from that string. You then copy the program into your editor or IDE and play with it to integrate it into your program. "

    Hating regex as much as the next guy, the tool's proposition seems enticing, yet I haven't figured out how to actually use it :-S (bookmarked for later reference)

links for 2011-04-15

Friday, April 15th, 2011
  • $ script/console
    >> r = ActionController::Routing::Routes

    >> r.recognize_path "/station/index/42.html"
    => {:controller=>"station", :action=>"index", :format=>"html", :id=>"42"}

    >> r.generate :controller => :station
    /station

  • Converts JavaScript code to a bookmarklet :
    * Removes newlines, tabs, and optional spaces
    * URL-encodes special ASCII characters: [space], %, ", <, >, #, @, &, ?
    * Places code in a wrapper function (if not done already)
    * Does not hex-encode non-ASCII characters (you should probably use String.fromCharCode anyway)

links for 2011-04-14

Thursday, April 14th, 2011

links for 2011-04-12

Tuesday, April 12th, 2011
  • Chris Soghoian urges Dropbox to encrypt user's files with keys only known to the user and (thus) abandon file deduplication:
    "it is possible to determine if any given file is already stored by one or more Dropbox users, simply by observing the amount of data transferred between your own computer and Dropbox's servers. If the file isn't already stored by Dropbox, the entire file will be uploaded. If Dropbox has the file already, just a few kb of communication will occur.

    While this doesn't tell you which other users have uploaded this file, presumably Dropbox can figure it out. I doubt they'd do it if asked by a random user, but when presented with a court order, they could be forced to.

    What this means, is that from the comfort of their desks, law enforcement agencies or copyright trolls can upload contraband files to Dropbox, watch the amount of bandwidth consumed, and then obtain a court order if the amount of data transferred is smaller than the size of the file."

  • For my own archive:
    "The information being transmitted is one of Facebook's basic building blocks: the unique "Facebook ID" number assigned to every user on the site. Since a Facebook user ID is a public part of any Facebook profile, anyone can use an ID number to look up a person's name, using a standard Web browser, even if that person has set all of his or her Facebook information to be private. For other users, the Facebook ID reveals information they have set to share with "everyone,[…].
    The apps reviewed by the Journal were sending Facebook ID numbers to at least 25 advertising and data firms, several of which build profiles of Internet users by tracking their online activities.
    […] the Journal found that one data-gathering firm, RapLeaf Inc., had linked Facebook user ID information obtained from apps to its own database of Internet users, which it sells. RapLeaf also transmitted the Facebook IDs it obtained to a dozen other firms, the Journal found."
  • "Pieceable lets you build native iPhone applications without programming. You focus on the content and styling – we provide the raw functionality. "

links for 2011-04-11

Monday, April 11th, 2011