(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| CREATE INDEX index_description_on_icd_codes ON icd_codes USING gin(to_tsvector(description)) |
| ###################### | |
| # | |
| # Monkey patch to ActiveRecord to prevent 'implicit' checkouts. Currently tested with Rails 4.0.8, prob | |
| # should work fine in Rails 4.1 too. | |
| # | |
| # If you create a thread yourself, if it uses ActiveRecord objects without | |
| # explicitly checking out a connection, one will still be checked out implicitly. | |
| # If it is never checked back in with `ActiveRecord::Base.clear_active_connections!`, | |
| # then it will be leaked. | |
| # |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| app.directive('faFastScroll', ['$parse', function ($parse) { | |
| var Interval = function(min, max) { | |
| this.min = min || 0; | |
| this.max = max || 0; | |
| }; | |
| Interval.prototype.clip = function(min, max) { | |
| if(this.max <= min || this.min >= max) { | |
| this.min = this.max = 0; |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| # Idea from http://krautcomputing.com/blog/2012/10/07/how-to-make-everything-background-processable-through-sidekiq/ | |
| # | |
| # Usage: | |
| # | |
| # class Synchronization | |
| # include Asyncable | |
| # end | |
| # | |
| # Then: | |
| # Synchronization.find(12).perform_async(:synchronize, 3, 2) |
| # ElasticSearch upstart script | |
| description "ElasticSearch service" | |
| start on (net-device-up | |
| and local-filesystems | |
| and runlevel [2345]) | |
| stop on runlevel [016] |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| # place in ./config/initializers | |
| # Usage | |
| # LL.warn "blah" | |
| # LL.warn @profile.inspect | |
| require 'pp' | |
| require 'log4r' | |
| require 'log4r/configurator' | |
| require 'log4r/yamlconfigurator' | |
| require 'log4r/outputter/fileoutputter' |
Введение
Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.
http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.
Ruby