I hereby claim:
- I am herko on github.
- I am herko (https://keybase.io/herko) on keybase.
- I have a public key ASA_n9grWcButDu4kKnOkvtHjnl3V1sUvp4Fw4yoQotypQo
To claim this, I am signing this object:
# This is an ExchangeRate model class. It is responsible for keeping local exchange rates up to date. | |
# Cron job trigger `ExchangeRate.update` to periodically refresh rates. This method also verifies if `auto` update is enabled. This gives admin ability to temporary disable refreshing. | |
# The update method fetches refresh rates and creates either direct conversion between two currencies, or indirect (through 3rd currency) if its not available. | |
# This implementation works as is, but can be better. Please refactor this class to extract and separate responsibilities and overall improve code quality. | |
require 'money/bank/open_exchange_rates_bank' | |
class ExchangeRate < ActiveRecord::Base | |
CURRENCIES = %w[usd eur aed] # and more |
// if you don't plan to upload only images : | |
/* | |
async function convertToFile(data: AsyncIterable<Uint8Array>) { | |
const chunks = []; | |
for await (const chunk of data) { | |
chunks.push(chunk); | |
} | |
return chunks; | |
} |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: Ruby |
<%# app/views/layouts/shared/_seo.html.erb %> | |
<% | |
title = construct_title(yield(:title)) | |
description = yield(:description) | |
og_image = yield(:og_image) | |
url = yield(:url).presence || request.original_url | |
%> | |
<title><%= title %></title> | |
<meta property="og:title" content="<%= title %>"> |
# app/builders/application_form_builder.rb | |
class ApplicationFormBuilder < ActionView::Helpers::FormBuilder | |
def form_group(method, options = {}, &block) | |
content = @template.capture(&block) | |
content += help_block_with_errors(method) if object.errors[method].any? | |
options[:class] ||= "" | |
options[:class] += " form-group" | |
@template.content_tag :div, content, options |
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "shift+cmd+.", | |
"command": "-breadcrumbs.focusAndSelect", | |
"when": "breadcrumbsPossible" | |
}, | |
{ | |
"key": "shift+cmd+.", | |
"command": "-breadcrumbs.toggleToOn", |
class ApplicationFormBuilder < ActionView::Helpers::FormBuilder | |
def form_group(method, options = {}, &block) | |
content = @template.capture(&block) | |
content += help_block_with_errors(method) if object.errors[method].any? | |
options[:class] ||= '' | |
options[:class] += ' form-group' | |
options[:class] += ' has-error' if object.errors[method].any? | |
@template.content_tag :div, content, options |
I hereby claim:
To claim this, I am signing this object:
export var structure = { | |
episodes: [ | |
{ | |
name: 'Planet Sandy', | |
levels: [ | |
{ | |
videoUrl: '/assets/videos/planet1_intro.mp4', | |
}, | |
{ | |
levelUrl: '/assets/levels/planet1/01.level', |
export var structure = { | |
episodes: [ | |
{ | |
name: 'Planet Sandy', | |
levels: [ | |
{ | |
videoUrl: '/assets/videos/planet1_intro.mp4', | |
}, | |
{ | |
levelUrl: '/assets/levels/planet1/01.level', |