POST /oauth/token HTTP/1.1
Content-Type: application/json
{
"grant_type": "password",
"client_id": "CLIENT_ID",
"owner_type": "OWNER_TYPE",
"username": "OWNER_EMAIL",
"password": "OWNER_PASSWORD"
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 toJSON(node) { | |
let propFix = { for: 'htmlFor', class: 'className' }; | |
let specialGetters = { | |
style: (node) => node.style.cssText, | |
}; | |
let attrDefaultValues = { style: '' }; | |
let obj = { | |
nodeType: node.nodeType, | |
}; | |
if (node.tagName) { |
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
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
# Utilize-o em 'config/locales/', com o nome de 'devise.pt-BR.yml'. | |
# Em 'config/application.rb', utilize => config.i18n.default_locale = :'pt-BR' | |
pt-BR: | |
devise: | |
confirmations: | |
confirmed: "Sua conta foi confirmada com sucesso." | |
send_instructions: "Você receberá um e-mail para confirmar sua conta em alguns minutos." |
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
module Reactor | |
class Task | |
property :block | |
def initialize(timestamp=Time.now, milliseconds=0, &block : Loop ->) | |
@block = block | |
@timestamp = timestamp.epoch_ms | |
@milliseconds = milliseconds | |
end | |
def run reactor |
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
files: ./spec/**/*_spec.cr | |
run: crystal spec %file% | |
--- | |
files: ./src/**/*.cr | |
run: crystal spec |
I recently had to upgrade my blog, which involved changes such as:
- Replacing a sitemap plugin
- Upgrading from jekyll 2.5.3 to 3.8.4
- Upgrading from jekyll-assets 0.7.8 to 3.0.11
- (etc)
The upgrading process was not trivial, and some parts (e.g. RSS, sitemap, or twitter cards tags) are not immediately visible, so I decided to add unit tests on the generated content.
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
<%= form_with(model: billboard) do |form| %> | |
<%= tag.div class: "dropzone", data: { controller: "dropzone", dropzone_param_name_value: "billboard[images][]", dropzone_url_value: rails_direct_uploads_url, dropzone_accepted_files_value: "image/*", dropzone_max_files_value: 3, dropzone_max_filesize_value: 0.300 } do %> | |
<div class="dz-default dz-message flex flex-col items-center"> | |
<%= image_tag "upload.svg", size: 28, class: "colorize-black", aria: { hidden: true } %> | |
<h5 class="font-semibold mbs-4">Drop files here or click to upload.</h5> | |
<p class="text-sm text-subtle">Upload up to 10 files.</p> | |
</div> | |
<% end %> | |
<div class="inline-flex items-center mbs-2 mie-1"> |