⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def select_from_chosen(item_text, options) | |
field_id = find_field(options[:from])[:id] | |
within "##{field_id}_chzn" do | |
find('a.chzn-single').click | |
input = find("div.chzn-search input") | |
item_text.each_char do |char| | |
input.base.invoke('keypress', false, false, false, false, char.ord, nil); | |
end | |
find('ul.chzn-results').click | |
input.base.invoke('keypress', false, false, false, false, 40, nil); # down arrow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'singleton' | |
tracer = TracePoint.new(:end) do |tp| | |
ancestors = tp.self.ancestors.dup | |
ancestors.delete(tp.self) | |
missing_methods = [] | |
ancestors.each do |ancestor| | |
methods = AbstractMethodManager.instance.methods[ancestor] | |
if methods | |
methods.each do |m| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This monkey patches the PostgreSQL adapter to use asynchronous | |
# communication when doing its "SELECT 1" check for is-connection-active. | |
# One symptom of this problem is stalled processing queues in Sidekiq. | |
# See also: | |
# | |
# https://github.com/rails/rails/issues/12867 | |
# | |
# At the time of writing we have seen indefinite blocking down in the C | |
# library's "poll()" method due to the out-of-box Rails code using blocking | |
# I/O, in multithreaded environments - one thread gets stuck in the I/O and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'openssl' | |
require 'puma/server' | |
require 'ds9' | |
class Server < DS9::Server | |
def initialize socket, app | |
@app = app | |
@read_streams = {} | |
@write_streams = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blockEnter(evt) {return true;} | |
function validarNoUsarTecladoReal_OnKeyPress(_object){return false;} |