Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gambala's full-sized avatar
🟢
Online

Vitaliy Emeliyantsev gambala

🟢
Online
View GitHub Profile
@gambala
gambala / Gemfile
Created June 6, 2020 15:02
blueimp-gallery inside rails
gem 'blueimp-gallery'
@gambala
gambala / checkvist-feels-good-at-night.css
Last active March 7, 2020 16:48
Checkvist feels good CSS theme
/* https://www.color-hex.com/color-palette/36646 */
html, body, .main_div {
background: #4b5162;
background: #282A36;
background: #3b3d4a;
color: #e5e5e5;
color: #F8F8F2;
}
@gambala
gambala / Makefile
Last active December 22, 2021 22:26
Makefile for Rails
# https://stackoverflow.com/a/14061796/2237879
#
# This hack allows you to run make commands with any set of arguments.
#
# For example, these lines are the same:
# > make g devise:install
# > bundle exec rails generate devise:install
# And these:
# > make add-migration add_deleted_at_to_users deleted_at:datetime
# > bundle exec rails g migration add_deleted_at_to_users deleted_at:datetime

Keybase proof

I hereby claim:

  • I am gambala on github.
  • I am gambala (https://keybase.io/gambala) on keybase.
  • I have a public key ASAcNq3bEZkYNOoxulD8WtPjwhUaFzzl4PZQCw3cycIKxwo

To claim this, I am signing this object:

@gambala
gambala / application_helper.rb
Last active August 1, 2017 16:27
http://images inside https://site with proxying in nginx
module ApplicationHelper
def http_url(url)
return url if Rails.env.development?
"/http_proxy?url=#{url}"
end
end
@gambala
gambala / rubocop.yml
Created July 27, 2017 10:16
Rubocop config
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- 'bin/*'
- 'db/schema.rb'
- 'node_modules/**/*'
- 'vendor/**/*'
TargetRubyVersion: 2.4
Layout/IndentationConsistency:
EnforcedStyle: normal
@gambala
gambala / admin.slim
Created July 24, 2017 18:36
Redis::Objects use case
p = user.ip_addresses.size
p = user.ip_addresses.value
@gambala
gambala / example.js
Created June 23, 2017 14:45
Params filter and formatter for fetch requests
import urlWithParams from 'urlWithParams'
fetch(
urlWithParams('/api/v1/cities.json', {
name: input,
city_id: this.state.cityID,
})
)
.then((response) => response.json())
.then((json) => {
@gambala
gambala / trello.css
Created September 28, 2016 22:15
Gambala theme for Trello
/* webfont */
@import 'https://fonts.googleapis.com/css?family=Roboto';
body,
button,
html,
input,
select,
textarea {
@gambala
gambala / palindrom_searcher.rb
Last active September 6, 2016 20:15
Palindrom searcher class
class PalindromSearcher
attr_accessor :string
def initialize(string)
@string = string
end
def longest
return unless all.any?
all.max_by(&:length)