Skip to content

Instantly share code, notes, and snippets.

View herko's full-sized avatar
💭
I may be slow to respond.

Lubomir Herko herko

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am herko on github.
  • I am herko (https://keybase.io/herko) on keybase.
  • I have a public key ASBjsCjH1_ckt542oGQlH61PHObq-pZ_fTP08JLvzW6H-Qo

To claim this, I am signing this object:

[
{ "keys": ["super+shift+."], "command": "erb" },
{ "keys": ["ctrl+k"], "command": "travel_to_pane", "args": {"direction": "up"} },
{ "keys": ["ctrl+l"], "command": "travel_to_pane", "args": {"direction": "right"} },
{ "keys": ["ctrl+j"], "command": "travel_to_pane", "args": {"direction": "down"} },
{ "keys": ["ctrl+h"], "command": "travel_to_pane", "args": {"direction": "left"} },
{ "keys": ["super+k", "super+l"], "command": "create_pane", "args": {"direction": "right"} },
{ "keys": ["super+k", "super+j"], "command": "create_pane", "args": {"direction": "down"} },
{ "keys": ["super+k", "super+shift+k"], "command": "destroy_pane", "args": {"direction": "up"} },
{ "keys": ["super+k", "super+shift+l"], "command": "destroy_pane", "args": {"direction": "right"} },
@herko
herko / .vimrc
Created April 30, 2019 22:09
VIM Configuration
set encoding=utf-8
let mapleader=","
set autowrite
set backspace=2
set cursorline
set history=60
set incsearch
set laststatus=2
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',

Keybase proof

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:

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
// 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",
@herko
herko / application_form_builder.rb
Created December 14, 2020 19:56
Using custom form builder in rails.
# 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
@herko
herko / _seo.html.erb
Created February 1, 2021 12:39
Managing SEO tags in rails application
<%# 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 %>">