This file contains hidden or 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
# frozen_string_literal: true | |
class ExampleComponent < MiniView | |
def template | |
button type: "button", class: [ | |
"inline-flex items-center gap-x-1.5 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm", | |
"hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" | |
] do | |
plain "This works" |
This file contains hidden or 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
export function reduceToParams(elements) { | |
return elements.reduce((hash, node) => Object.assign(hash, { [node.name]: node.value }), {}) | |
} | |
export function stopEverything(e) { | |
e.preventDefault() | |
e.stopPropagation() | |
e.stopImmediatePropagation() | |
} |
This file contains hidden or 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
# frozen_string_literal: true | |
class Bunny::Url | |
attr_reader :path, :expires_in, :options | |
def initialize(path, options = {}) | |
@path = path.respond_to?(:key) ? path.key : path | |
@expires_in = options.delete(:expires_in) || 1.week | |
@options = options | |
end |
This file contains hidden or 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
Error: | |
Api::V1::ScoresControllerTest#test_should_rescue_validation_errors: | |
NameError: undefined local variable or method `view_context' for #<Api::V1::ScoresController:0x000055e37a95b470> | |
Did you mean? view_runtime | |
/home/virtualbox/.asdf/installs/ruby/2.6.1/lib/ruby/gems/2.6.0/gems/active_decorator-1.2.0/lib/active_decorator/monkey/action_controller/base/rescue_from.rb:10:in `rescue_with_handler' | |
/home/virtualbox/.asdf/installs/ruby/2.6.1/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_controller/metal/rescue.rb:25:in `rescue in process_action' | |
/home/virtualbox/.asdf/installs/ruby/2.6.1/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_controller/metal/rescue.rb:21:in `process_action' | |
/home/virtualbox/.asdf/installs/ruby/2.6.1/lib/ruby/gems/2.6.0/gems/actionpack-5.2.3/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' | |
/home/virtualbox/.asdf/installs/ruby/2.6.1/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `block |
This file contains hidden or 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
import { useState, useEffect } from 'react' | |
const store = { | |
state: {}, | |
setters: [] | |
}; | |
export function setStore(value) { | |
store.state = value; | |
store.setters.forEach(setter => setter(store.state)); |
This file contains hidden or 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
<style> | |
.nav-item-ranking { display: none } | |
</style> |
This file contains hidden or 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
<style> | |
:root { | |
--invite-bg: url("https://store-images.s-microsoft.com/image/apps.56149.13510798887023509.52cb7b9d-27cf-417d-b33e-e4e758263928.1129934f-d053-41a1-935a-20913a56ea70?mode=scale&q=90&h=720&w=1280"); | |
} | |
</style> |
This file contains hidden or 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! s:setup_insmode() | |
inoremap <buffer> <silent> <nowait> <Esc> <C-r>=lexima#insmode#escape()<CR><Esc> | |
endfun | |
function! Multiple_cursors_before() | |
let b:lexima_disabled = 1 | |
silent! iunmap <buffer> <esc> | |
augroup lexima | |
au! | |
augroup END | |
endfunction |
This file contains hidden or 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
WITH RECURSIVE lectures AS ( | |
SELECT lessons.id, title, ancestry, section_id, lessons.position FROM lessons | |
JOIN sections ON sections.id = section_id AND sections.deleted_at IS NULL | |
WHERE lessons.course_id = ? AND lessons.deleted_at IS NULL | |
ORDER BY ancestry ASC NULLS FIRST, sections.position ASC, sections.created_at ASC, lessons.position ASC | |
), | |
nodes AS ( | |
SELECT ARRAY[section_id] AS path, * FROM lectures | |
WHERE ancestry IS NULL |
This file contains hidden or 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
<style> | |
.button.is-primary, | |
.button.is-primary:hover, | |
.button.is-primary:active, | |
.button.is-primary:disabled { | |
background-color: red; /* COR DO BOTÃO */ | |
} | |
.notification.is-info { | |
background-color: blue; /* COR DA CAIXA */ |
NewerOlder