Differences between revisions 9 and 42 (spanning 33 versions)
Revision 9 as of 2011-04-05 23:23:18
Size: 10972
Editor: SamatJain
Comment:
Revision 42 as of 2011-07-19 23:16:03
Size: 9068
Editor: SamatJain
Comment: Finish Flattr article
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= More file descriptors for Transmission on Linux = = I'm Flattr'ed! =

== Support my writing via Flattr, a new social micropayment system ==
Line 5: Line 7:
Have you run out of file descriptors for [Transmission][transmission]? The torrent will be stopped (for no apparent reason), and when you examine it: I conducted an experiment back when I wrote my [HP N36L review][n36lreview]: I added affiliate links to both [Amazon](http://amazon.com/) and [Newegg](http://newegg.com), hopefully to get some revenue without polluting my site with advertisements.
Line 7: Line 9:
  [transmission]: http://www.transmissionbt.com/   [n36lreview]: http://blog.samat.org/2010/12/10/Hardware-review-of-the-Hewlett-Packard-ProLiant-N36L-Microserver
Line 9: Line 11:
<code>
$ transmission-remote -t 1 -i | grep -i descriptor
</code>
It was successful; I earned enough to pay for a few cups of espresso, at least.
Line 13: Line 13:
Time to increase the number of file descriptors available. This article is tailored towards Debian and Ubuntu. Many authors have PayPal-powered "tip jars" or links to their Amazon wishlist. I've now setup the same, but I think it's unrealistic visitors spend the requisite time or money to use them.
Line 15: Line 15:
It's unlikely you'll need to raise your system's global limit. Check with: Enter [Flattr](http://flattr.com), a new "social micropayments" platform, a tip jar evolved to work on Web scale. Flattr is a quick and easy way to give back to content creators—including myself. Rather than trying to explain it, watch [Flattr's introductory video][flattr-video]. I love the cake analogy.
Line 17: Line 17:
<code>
$ cat /proc/sys/fs/file-max
397460
</code>
If you want to get an item from my Amazon wish list, please do! But what if you wanted to contribute less? And why would anyone else want to use Flattr over PayPal?
Line 22: Line 19:
The OS needs a couple thousand file descriptors for itself. Make sure to make space for them with whatever numbers to choose below. In my case, I've more than enough. Well, one, it's simpler. Users need only click a single button (the Flattr widget) to Flattr me. Also, users don't need to worry about figuring out how much to give me—Flattr's "cake cutting" algorithm does it for you. Nothing stops you from [donating more][flattr-donate], of course.
Line 24: Line 21:
But, if you need to, you can; to set it to a million (this will be remembered across reboots):   [flattr-donate]: https://flattr.com/donation/give/to/tamasrepus
Line 26: Line 23:
<code>
sudo sh -c "echo fs.file-max=$(dc -e '2 20 ^ p') > /etc/sysctl.d/file-descriptors-max.conf
sudo service procps restart
</code>
Second, Flattr's rates are better. Say you've decided to add $10/month to your Flattr account, and you've Flattr'ed 10 people, including me. Each of those people will be entitled to $1. With Flattr's 10% commission, I'd get 90¢; with PayPal's default fee schedule, I'd get 67.1¢ ($1-($1×2.9%+$0.30)). Big difference. Flattr works well when you're dealing with small amounts (called micropayments), exactly the niche market they're trying to fill.
Line 31: Line 25:
While you may not need to change your system's global limit, you probably will need to change the limit for your users. Check the limit with: Imagine you're walking down the street and hear a great musician, to whom you'd like to donate some small change. It's easy to do in the real world. With conventional payment systems oriented around transactions, this model doesn't translate. With Flattr, however, the model does—it brings a donation system and ethic present within the real world onto the Web.
Line 33: Line 27:
<code>
$ ulimit -Hn
1024
$ ulimit -Sn
1024
</code>
PayPal has its own [little-known micropayments platform][paypal-micropayments] with a better fee schedule, but it requires the receiver to go through a manual approval process to receive a special account. It's only available in a few countries and has been a "beta" product for years, implying PayPal does not care much about it. Why should they? PayPal, making money on high-value transactions, has little incentive to develop micropayments—not until there's marketshare and mindshare to steal, something Flattr is building.
Line 40: Line 29:
If you're working with hundreds of torrents (each with dozens to hundreds of files) with Transmission, this isn't enough. To let a user have a few thousand (16,384, in fact), create a new file /etc/security/limits.d/debian-transmission.conf: Third, with free culture luminaries like Peter Sunde of [The Pirate Bay][pb] fame behind it, Flattr seems less likely to "censor" recipients, holding funds hostage and even confiscating them, something for which PayPal is notorious. While I'm not worried about anyone censoring my overly-politically correct blog, should I be OK with organizations unfairly censoring others? \*cough\* [WikiLeaks](http://wikileaks.ch/) \*cough\*
Line 42: Line 31:
<code>
sudo sh -c "echo debian-transmission soft nofile $(dc -e '2 14 ^ p') > /etc/security/limits.d/debian-transmission.conf
sudo sh -c "echo debian-transmission hard nofile $(dc -e '2 14 ^ 2 7 ^ + p') >> /etc/security/limits.d/debian-transmission.conf
</code>
Flattr is so nascent, it's unlikely I earn a significant amount of money. And the meager money I do earn I will probably use to Flattr others. But it's easy to use, low-risk for myself and visitors, and most importantly I believe in its ethos—so why not?
Line 47: Line 33:
Replace "debian-transmission" with the user that is running Transmission. If you like this post or my blog, please [flattr it][samatsays-flattr]!
Line 49: Line 35:
For the changes to go into effect, you need to logout completely, and log back in again. Reboot to make sure they get applied. You'll see you have many more file descriptors available:   [pb]: https://thepiratebay.org/
  [flattr-video]: http://youtu.be/9zrMlEEWBgY
  [paypal-micropayments]: https://micropayments.paypal-labs.com/
  [samatsays-flattr]: https://flattr.com/thing/340884/Samat-Says
Line 51: Line 40:
<code>
$ ulimit -Hn
16512
$ ulimit -Sn
16384
</code>
Line 58: Line 41:
Now, we need to configure Transmission to use this many. In /etc/transmission-daemon/settings.json, find the open-file-limit option and edit it accordingly (i.e. set it to 16384). When done, restart transmission-daemon An aside: you're not going to see widgets on any my sites. That includes Facebook Like buttons or share buttons for Twitter and Google Buzz/Plus/their latest failure. It's amazing these corporations have convinced webmasters into adding things that both slow the performance of their websites and compromise visitors' privacy, for little/no tangible benefit the webmasters themselves—you'll not see any of that here.
Line 60: Line 43:
<code>
sudo service transmission-daemon restart
</code>

If you're not running Transmission as a system, user, you'll need to edit the configuration file and restart the daemon appropriately (if you're running Transmission in this fashion, I'll assume you know how to do that).
However, in a minor bout of hypocrisy, I have added Flattr widgets. They use performance-oriented, "progressively enchanced" HTML and Javascript, so their widget doesn't slow sites down. Also, since they're not a "free" social or advertising network, I don't believe them to have any motive in tracking visitors across the Web.
Line 68: Line 47:
= Why I use Firefox 4 Mobile, & Other Thoughts = = Michael Madsen's Into Eternity =
Line 71: Line 50:
Earlier this week, [Mozilla released Firefox 4 Mobile][ff4mobilerelease] (née Fennec) for both Android and Maemo. With Chernobyl's 25th anniversary a few weeks past (ignored, for the most part, by Western media), and the Fukushima nuclear disaster fresh in everyone's minds, now is as good a time as any think about nuclear energy's role in our civilization. [Into Eternity][ie], a Finnish documentary released in 2010, takes a very unique look at the nuclear power industry, one not typically thought about. Rather than nuclear proliferation or the plants themselves, it focuses on the geologic storage of [spent nuclear fuel][snf] (aka <abbr title="Spent Nuclear Fuel">SNF</abbr>), in particular, [Finland's Onkalo repository][onkalo].
Line 73: Line 52:
  [ff4mobilerelease]: http://blog.mozilla.com/blog/2011/03/29/mozilla-launches-firefox-4-for-android-allowing-users-to-take-the-power-and-customization-of-firefox-everywhere-2/   [ie]: http://www.intoeternitythemovie.com/
  [snf]: http://en.wikipedia.org/wiki/Spent_nuclear_fuel
  [onkalo]: http://en.wikipedia.org/wiki/Onkalo
Line 75: Line 56:
I've had an Android phone since 2008 and honestly, I've never browsed the web on my phone as much as I have in the past few months when I started using Firefox 4 Mobile. It really is that much better! Here are my thoughts (focused on the Android version) on why. Mostly, it's a treatise on how much Google is dropping the ball on Android's built-in browser. Spent nuclear fuel
Line 77: Line 58:
## Sync ## Low-level nuclear wastes include things such as clothing, plant construction materials (e.g. concrete) and machinery
Line 79: Line 60:
Firefox 4 Mobile's number 1 killer feature is [Sync][sync], which syncs tabs, logins, browser history, and bookmarks across multiple devices. The most useful of these are logins and browser history. At the moment, the US does not have a storage plan for spent nuclear fuel. There is one geologic storage site, the [Waste Isolation Pilot Plant][wipp] in southeastern New Mexico, but the site is relatively small and destined for storing the generation I nuclear wastes of America's nuclear weapons programs, not that of commercial reactors. A larger site, [Yucca Mountain][ym], well isolated in the [Nevada Test Range][nts] (where nuclear weapons were tested for decades, and much contamination remains), was shelved in 2010 by the Obama administration, leaving America's nuclear energy industry without secure storage for its spent nuclear fuel.
Line 81: Line 62:
  [sync]: http://www.firefox.com/sync   [wipp]: http://en.wikipedia.org/wiki/WIPP
  [ym]: http://en.wikipedia.org/wiki/Yucca_Mountain_nuclear_waste_repository
  [nts]: http://en.wikipedia.org/wiki/Nevada_Test_Site
Line 83: Line 66:
It's a *complete* pain to type user names and passwords on mobile keyboards, exacerbated personally since I practice good security and use a different password for each site on the web. Because Firefox Sync makes available on my phone all the passwords I've saved on my desktop, I never need fumble entering or remember anything anymore. Much of the topics <i>Into Eternity</i> touches, such as communicating the dangers of nuclear wastes stored at sites via markers and monuments, has similarly been discussed for the US' Waste Isolation Pilot Plant.
Line 85: Line 68:
I use the web quite a bit (who doesn't?), proof of which is my 15 MiB history file. Sync makes available that same browsing history, everywhere. Having your browser history available to do simple things like coloring visited links purple really makes a difference (e.g., think about looking through apartment listings on Craigslist). }}}
Line 87: Line 70:
Having history available also powers Firefox 4 Mobile's Awesome Bar. I don't need to remember exact URLs anymore, or rely on a search engine—I can just start typing a keyword and Firefox's Awesome Bar automatically searches URLs and page titles of pages I've visited, just like it does on the desktop. = Drupal 7 upgrade post-mortem =
Line 89: Line 72:
As a freedom-loving, free and libre open source software advocate, another bit about Sync I love is that it is an [autonomous web service][autonomous]. That is, you can [download the server-side component of Sync][syncserver] and run it yourself, should you not trust Mozilla. {{{#!text_markdown
This weekend, I upgraded [Samat Says][samatsays] (this blog, in case you missed the memo) to [Drupal 7][d7].
Line 91: Line 75:
  [autonomous]: http://autonomo.us/2008/07/franklin-street-statement/
  [syncserver]: http://hg.mozilla.org/services/minimal-server/
  [samatsays]: http://blog.samat.org/
  [d7]: http://drupal.org/drupal-7.0
Line 94: Line 78:
Google has a Sync-like feature in Android 3.0 for its built-in web browser and Chrome for your desktop, but so far nothing is available for anyone stuck on older versions of Android. It also isn't autonomous—you're locked into trusting Google. For my Drupal 4.6/4.7-based site, I had created my own theme, [Sands][sands]. Lack of time prevented me from porting Sands to Drupal 5 or 6, and it's unlikely it will be ported forward. I'm probably going to recreate it with one Drupal 7's many starter themes, however.
Line 96: Line 80:
## HTML5 ##

Firefox 4 Mobile has much better HTML5 support, in the sense it supports more [New & Exciting Web Technologies][newt] (<abbr title="New & Exciting Web Technologies">NEWT</abbr>), such as CSS3, SVG, and new Javascript APIs.

  [newt]: http://www.brucelawson.co.uk/2010/meet-newt-new-exciting-web-technologies/

Firefox has dropped vendor-specific prefixes for many CSS3 properties, including box-shadow, text-shadow, etc. All in all, it makes your CSS that much more clean.

There's support for SVG, only [recently supported in Android 3.0][androidsvg].

  [androidsvg]: http://code.google.com/p/android/issues/detail?id=1376

There's support for [notifications][notifications] via a proprietary API. Recently landed in Chrome 10, it's still missing (AFAIK?) in Android 3.0, even with 3.0's rich notifications support.

  [notifications]: https://developer.mozilla.org/en/DOM/Displaying_notifications

The iPhone has had multi-touch Javascript events (think pinch-to-zoom, essential for mapping widgets) since its debut, but such events are still [missing from Android][androidmt] while introduced much later. Firefox 4 Mobile has had [multi-touch support][ffmt] since last year, though, it's slightly different than the WebKit implementation and, IMHO, a bit more difficult to use without built-in gesture handling (i.e. no easy-to-use pinch Javascript event).

  [androidmt]: http://code.google.com/p/android/issues/detail?id=11909
  [ffmt]: http://hacks.mozilla.org/2010/08/firefox4-beta3/

## Other stuff

Firefox 4 Mobile also supports add-ons. While I haven't found the need for any, there are some neat ports, like [Adblock Plus Mobile][adpmobile]. Expect the list of add-ons to grow quickly.

  [adpmobile]: https://addons.mozilla.org/en-US/mobile/addon/adblock-plus/


When Firefox 4 Mobile was in beta, Mozilla didn't do a very good job alerting people to its high system requirements. However, on release, a [supported platforms and systems requirements page][sysreq] is first and foremost. A summary: you need a phone with at least 512 MiB RAM. The official builds require an ARMv7-generation processor (or more specifically, one that supports [ARM's Thumb instruction set][thumb]), but there are [unsupported builds for older ARMv6 devices][armv6builds] that have enough RAM (e.g. T-Mobile's MyTouch Slide, aka the HTC Espresso). Not to gloat, but Firefox 4 Mobile for Android works great on my T-Mobile G2.

  [sysreq]: http://www.mozilla.com/en-US/mobile/platforms/
  [thumb]: http://en.wikipedia.org/wiki/ARM_architecture#Thumb
  [armv6builds]: https://wiki.mozilla.org/Mobile/Platforms/Android#ARMv6_.28experimental.29

[Go download Firefox 4 Mobile now][download] from Mozilla's landing page if you've not done so already. You can also get it from the [Android Market][market], or, if you don't or can't use the Android Market, get the [latest Firefox 4 Mobile release from Mozilla's FTP site][ftp] instead. Also, if you're playing [Mozilla's Spark][spark], please [tag me][sparktag]!

  [download]: http://firefox.com/m/
  [market]: https://market.android.com/details?id=org.mozilla.firefox
  [ftp]: http://releases.mozilla.org/pub/mozilla.org/mobile/releases/latest/
  [spark]: https://spark.mozilla.org/
  [sparktag]: https://spark.mozilla.org/en-US/user/tamasrepus?f=t

On to other thoughts…

Firefox 4 Mobile's previous name was Fennec 2.0, a name I much prefer. But somewhere along the way, Mozilla decided to take a page from Microsoft's marketing playbook—home of atrocities like Microsoft Windows Live Mesh and [Microsoft Windows Server Base Operating Systems Management Pack for Microsoft Operations Manager 2005][longestmsname]. What makes it worse is disambiguating Firefox 4 Mobile for Android and Firefox 4 Mobile for Maemo means you're using 5 words for a product title.

  [longestmsname]: http://blogs.msdn.com/b/jonathanh/archive/2005/08/05/what-s-the-longest-microsoft-product-name.aspx
  [sands]: http://wiki.samat.org/Sands

I'm Flattr'ed!

Support my writing via Flattr, a new social micropayment system

I conducted an experiment back when I wrote my HP N36L review: I added affiliate links to both Amazon and Newegg, hopefully to get some revenue without polluting my site with advertisements.

It was successful; I earned enough to pay for a few cups of espresso, at least.

Many authors have PayPal-powered "tip jars" or links to their Amazon wishlist. I've now setup the same, but I think it's unrealistic visitors spend the requisite time or money to use them.

Enter Flattr, a new "social micropayments" platform, a tip jar evolved to work on Web scale. Flattr is a quick and easy way to give back to content creators—including myself. Rather than trying to explain it, watch Flattr's introductory video. I love the cake analogy.

If you want to get an item from my Amazon wish list, please do! But what if you wanted to contribute less? And why would anyone else want to use Flattr over PayPal?

Well, one, it's simpler. Users need only click a single button (the Flattr widget) to Flattr me. Also, users don't need to worry about figuring out how much to give me—Flattr's "cake cutting" algorithm does it for you. Nothing stops you from donating more, of course.

Second, Flattr's rates are better. Say you've decided to add $10/month to your Flattr account, and you've Flattr'ed 10 people, including me. Each of those people will be entitled to $1. With Flattr's 10% commission, I'd get 90¢; with PayPal's default fee schedule, I'd get 67.1¢ ($1-($1×2.9%+$0.30)). Big difference. Flattr works well when you're dealing with small amounts (called micropayments), exactly the niche market they're trying to fill.

Imagine you're walking down the street and hear a great musician, to whom you'd like to donate some small change. It's easy to do in the real world. With conventional payment systems oriented around transactions, this model doesn't translate. With Flattr, however, the model does—it brings a donation system and ethic present within the real world onto the Web.

PayPal has its own little-known micropayments platform with a better fee schedule, but it requires the receiver to go through a manual approval process to receive a special account. It's only available in a few countries and has been a "beta" product for years, implying PayPal does not care much about it. Why should they? PayPal, making money on high-value transactions, has little incentive to develop micropayments—not until there's marketshare and mindshare to steal, something Flattr is building.

Third, with free culture luminaries like Peter Sunde of The Pirate Bay fame behind it, Flattr seems less likely to "censor" recipients, holding funds hostage and even confiscating them, something for which PayPal is notorious. While I'm not worried about anyone censoring my overly-politically correct blog, should I be OK with organizations unfairly censoring others? *cough* WikiLeaks *cough*

Flattr is so nascent, it's unlikely I earn a significant amount of money. And the meager money I do earn I will probably use to Flattr others. But it's easy to use, low-risk for myself and visitors, and most importantly I believe in its ethos—so why not?

If you like this post or my blog, please flattr it!

An aside: you're not going to see widgets on any my sites. That includes Facebook Like buttons or share buttons for Twitter and Google Buzz/Plus/their latest failure. It's amazing these corporations have convinced webmasters into adding things that both slow the performance of their websites and compromise visitors' privacy, for little/no tangible benefit the webmasters themselves—you'll not see any of that here.

However, in a minor bout of hypocrisy, I have added Flattr widgets. They use performance-oriented, "progressively enchanced" HTML and Javascript, so their widget doesn't slow sites down. Also, since they're not a "free" social or advertising network, I don't believe them to have any motive in tracking visitors across the Web.

Michael Madsen's Into Eternity

With Chernobyl's 25th anniversary a few weeks past (ignored, for the most part, by Western media), and the Fukushima nuclear disaster fresh in everyone's minds, now is as good a time as any think about nuclear energy's role in our civilization. Into Eternity, a Finnish documentary released in 2010, takes a very unique look at the nuclear power industry, one not typically thought about. Rather than nuclear proliferation or the plants themselves, it focuses on the geologic storage of spent nuclear fuel (aka SNF), in particular, Finland's Onkalo repository.

Spent nuclear fuel

Low-level nuclear wastes include things such as clothing, plant construction materials (e.g. concrete) and machinery

At the moment, the US does not have a storage plan for spent nuclear fuel. There is one geologic storage site, the Waste Isolation Pilot Plant in southeastern New Mexico, but the site is relatively small and destined for storing the generation I nuclear wastes of America's nuclear weapons programs, not that of commercial reactors. A larger site, Yucca Mountain, well isolated in the Nevada Test Range (where nuclear weapons were tested for decades, and much contamination remains), was shelved in 2010 by the Obama administration, leaving America's nuclear energy industry without secure storage for its spent nuclear fuel.

Much of the topics Into Eternity touches, such as communicating the dangers of nuclear wastes stored at sites via markers and monuments, has similarly been discussed for the US' Waste Isolation Pilot Plant.

Drupal 7 upgrade post-mortem

This weekend, I upgraded Samat Says (this blog, in case you missed the memo) to Drupal 7.

For my Drupal 4.6/4.7-based site, I had created my own theme, Sands. Lack of time prevented me from porting Sands to Drupal 5 or 6, and it's unlikely it will be ported forward. I'm probably going to recreate it with one Drupal 7's many starter themes, however.

Patient care in the ICU in terms of vectors and topological spaces

Biomedical Informatics, Medicine

A few weeks ago, Timothy G. Buchman gave a talk at the Columbia DBMI weekly research seminar. During the QA session, someone asked why patients in intensive care units (ICUs) were given such “extreme” treatments, often causing them to develop new health problems and complications, keeping them in the hospital. He replied with this wonderful mathematical metaphor about patient care.

You are a point in an n-dimensional space. Each dimension is some vital sign or homeostatic attribute, e.g. blood pressure, blood glucose, temperature, etc. Homeostasis is defined a polytope in that space. As you do the various things of life, your point moves within the space defined by that polytope. For example, when you eat, your blood sugar goes up, and the point moves along in the blood sugar dimension; when you take a cold shower, your body temperature is reduced, and you move along in that dimension. Young people have a large space inside their homeostatic polytope

When you leave this homeostatic polytope, you're considered “sick.” If you travel to far from it, you die.

People who enter the ICU have points that are moving away from their homeostatic polytope. Their movement away can be represented as a vector, representing how quickly their condition is deteriorating.

Treatments in the ICU represent vectors that try to point you back towards your homeostatic polytope.


SamatsWiki: DraftBlogs (last edited 2016-08-19 22:04:14 by SamatJain)