...the data to /tmp/geodb_coodinates.csv. And it's fast: Query OK, 337925 rows affected (0.86 sec) SELECT * INTO OUTFILE '/tmp/geodb_coordinates.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n...
sudo apt-get install i8kutils Reboot You can now run the i8k tools such as i8kmon Setting the fan speed to high (2) will only work shortly as the fan...
...is somehow controlled automatically.\ This helps you out in bash: while true; do i8kfan - 2; sleep 0.2; done There should be a better solution and it will be posted as...
...so ETags are only saving you render time and some bandwidth. While working on a Sinatra-based JSON web service that gets very heavy traffic, I wanted to find a...
...way to short-circuit requests and avoid most of the stack if a resource hasn’t been modified...
If you need to call a state_machine event and do not want to re-define resource_controller's create method, try this: create.before do object.state_event = :launch_spaceship
You may omit the /path/to/link_name to have a link with the same filename appear in the current directory
It's that simple to allow one of your Linux users to run a single command as UID 0: sudo visudo Add the line below to allow user 'deploy' to...
...that you want to provide default views for a group of controllers. Let’s say you have a bunch of controllers inside the Admin namespace and you would like each...
...action for Admin::PostsController and “app/views/admin/posts/index.html.*” is not available, it should then render “app/views/admin/defaults/index.html”. Since Rails 3.0, we have a new abstraction called resolvers that holds the logic to find...
...is that the purpose of refinements in Ruby 2.0 is to make monkey-patching safer. Specifically, the goal is to make it possible to extend core classes, but to limit...
...the effect of those extensions to a particular area of code. Since the purpose of this feature is make monkey-patching safer, let’s take a look at a dangerous...
Imagine all the syntactical delights of Ruby and Haml for your JavaScript. You write in a nice language, but get normal JavaScript at runtime. All whilst having full access to...
...3rd-party JavaScript libraries (jQuery, PrototypeJS), debugging support (it becomes pure, readable JavaScript), existing support from test suites (it’s normal JavaScript) and growing support from various text editors (TextMate...
Apple’s App Store was a constant source of stress in the development process. Every time another story of Apple randomly booting an app from the store came out, the...
...Apple could deny the app, or even keep it in limbo forever, made us second- or third-guess every design decision. “Will this pixel hurt our chances of getting accepted...
Web designers must be free to experiment with these new fonts, to sketch, comp and get to know these typefaces in browser and non-browser applications. This is...
This isn't about commercial software vs. Open Source software. It's about assessing your real needs and understanding the cost-benefit balance before making significant financial decisions. Don't...
...buy iApps. Buying an iPad for your kids isn't a means of jump-starting the realization that the world is yours to take apart and reassemble; it's a...
...way of telling your offspring that even changing the batteries is something you have to leave to the professionals...
YARD 0.6 adds the ability to serve documentation for gems as well as the current project with yard server. Just like gem server in RubyGems, you can serve gem docs...
...The advantage to YARD’s server is that you don’t need to pre-generate the static docs (with a gem install) before running the server. If you installed your...
...probably one of the most dramatic reimaginations of the desktop user interface I’ve seen in a long time. This concept proposes a multitouch interaction system that does not require...
...a multitouch screen (and thus does not have to deal with all the problems such a screen causes), but instead uses a multitouch area near the keyboard...
Chargify handles every aspect of recurring billing for your Web 2.0 or SaaS company so there’s no need to build a custom billing application. In addition to processing one...
Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means that you're not verifying the identity of the server...
Gem to generate entity relationship diagrams from your Rails 3 ActiveRecord models. The diagram style is pretty and configurable...
jQuery's selector engine, live()-like event handlers, pixel-perfect layout measuring...
...for being complicated to install. Let’s wrassle this little myth to the ground, shall we...
Thanks to habits engrained by Rails 2’s link_to_remote and remote_form_for, we expect that Rails 3...
It’s pretty common for projects hosted on GitHub to receive “pull requests”: requests from people who have cloned your...
Ruport’s acts_as_reportable module provides support for using ActiveRecord for data collection. You can use it to get a Ruport::Data::Table from an ActiveRecord model. This cheatsheet...
Squirrel is an enhancement for ActiveRecord’s find method that allows programmers to query the database using a more Rubyish syntax...