I hereby claim:
- I am zavan on github.
- I am zavan (https://keybase.io/zavan) on keybase.
- I have a public key ASB4ihhy842Chr2enc96nl_Z7X-q2ifWY5sdm45FnDPk9wo
To claim this, I am signing this object:
class Teste | |
include Enumerable | |
attr_reader :n | |
def initialize(n) | |
@n = valid?(n) ? n.to_i : 100 | |
end | |
def each |
pt-BR: | |
errors: | |
or: "ou" | |
array?: "deve ser um array" | |
empty?: "deve estar vazio" | |
excludes?: "não pode incluir %{value}" | |
excluded_from?: |
# See: https://github.com/thoughtbot/clearance/blob/3e9529a643cff20beb9bb49eacedb90dee49d465/lib/clearance/testing/controller_helpers.rb | |
class ClearanceAuth < DerailedBenchmarks::AuthHelper | |
def setup | |
require 'clearance/session' | |
@user = User.first # Change to fit your needs | |
end | |
def call(env) | |
env[:clearance] = Clearance::Session.new(env) |
I hereby claim:
To claim this, I am signing this object:
vars: | |
timezone: America/Sao_Paulo | |
- name: Get current MySQL timezone | |
become: yes | |
mysql_variables: | |
variable: time_zone | |
register: mysql_tz | |
- set_fact: |
--- | |
- name: Find user home | |
set_fact: | |
user_home: "{{ ansible_env.HOME }}" | |
- name: Set rbenv dir | |
set_fact: | |
rbenv_dir: "{{ user_home }}/.rbenv" | |
- name: Set rbenv bin path |
// Just open a test page on typing.com and run this on the browser console: | |
// Tested on Safari. | |
// If you get errors, increase the setTimeout time. | |
$('.letter').each(function(i) { | |
setTimeout(() => { | |
const text = $(this).text(); | |
let char = text; | |
let charCode = char.charCodeAt(0); |
let time = 10; // Increase this if you're getting typing errors | |
function pressKey(key, code, eventType = 'keypress') { | |
console.log(`Typing "${key}" (${code}) with event ${eventType}`); | |
let event = new KeyboardEvent(eventType, { | |
key: key, | |
keyCode: code, | |
which: code, | |
charCode: code |
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Monterey.
Make sure openssl
is installed on Mac via Homebrew.
# See https://stackoverflow.com/a/63740582/1415262 | |
class TinymceController < ApplicationController | |
skip_forgery_protection | |
respond_to :json | |
def spellcheck | |
suggestions = check_spelling_new( | |
spellcheck_params[:text], |