This is a very simple lightweight plugin to allow you to move the caret (or cursor) position in an <input /> or <textarea> element.
By exposing three jQuery.fn methods you can easily move a a caret to any position you like:
| From: Chris DeSalvo <[email protected]> | |
| Subject: Why we can't process Emoji anymore | |
| Date: Thu, 12 Jan 2012 18:49:20 -0800 | |
| Message-Id: <[email protected]> | |
| --Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B | |
| Content-Transfer-Encoding: quoted-printable | |
| Content-Type: text/plain; | |
| charset=utf-8 |
| #!/usr/bin/env ruby | |
| #/ Usage: <progname> [options]... | |
| #/ How does this script make my life easier? | |
| # ** Tip: use #/ lines to define the --help usage message. | |
| $stderr.sync = true | |
| require 'optparse' | |
| # default options | |
| flag = false | |
| option = "default value" |
| # MySQL. Versions 4.1 and 5.0 are recommended. | |
| # | |
| # Install the MySQL driver: | |
| # gem install mysql2 | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: | |
| adapter: mysql2 | |
| encoding: utf8 |
| NOTE: You will need at least Redis 2.1.6 to use the ZREVRANGEBYSCORE method. | |
| Add players to HIGHSCORES table: | |
| fossil:~ dczarnecki$ redis-cli | |
| redis> zadd HIGHSCORES 1 player_1 | |
| (integer) 1 | |
| redis> zadd HIGHSCORES 2 player_2 | |
| (integer) 1 | |
| redis> zadd HIGHSCORES 3 player_3 |
| Rails.application.routes.draw do | |
| get '/(:locale)/products/(:category)/(page/:page).:extension', | |
| :to => 'products#index', | |
| :as => :products, | |
| :constraints => { | |
| :locale => /[a-z]{2}/, | |
| :category => /.+?/, | |
| :page => /\d+/ | |
| }, |
| #Deploy and rollback on Heroku in staging and production | |
| task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| namespace :deploy do | |
| PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
| STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
| task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
| task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |