Skip to content

Instantly share code, notes, and snippets.

💨
Run in place

Vitaliy Emeliyantsev gambala

💨
Run in place
Block or report user

Report or block gambala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gambala
gambala / checkvist-feels-good-at-night.css
Created Feb 6, 2020
Checkvist feels good CSS theme
View checkvist-feels-good-at-night.css
/* 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 Jan 25, 2020
Makefile for Rails
View Makefile
# 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
View keybase.md

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 Aug 1, 2017
http://images inside https://site with proxying in nginx
View application_helper.rb
module ApplicationHelper
def http_url(url)
return url if Rails.env.development?
"/http_proxy?url=#{url}"
end
end
View rubocop.yml
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 Jul 24, 2017
Redis::Objects use case
View admin.slim
p = user.ip_addresses.size
p = user.ip_addresses.value
@gambala
gambala / example.js
Created Jun 23, 2017
Params filter and formatter for fetch requests
View example.js
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 Sep 28, 2016
Gambala theme for Trello
View trello.css
/* webfont */
@import 'https://fonts.googleapis.com/css?family=Roboto';
body,
button,
html,
input,
select,
textarea {
@gambala
gambala / palindrom_searcher.rb
Last active Sep 6, 2016
Palindrom searcher class
View palindrom_searcher.rb
class PalindromSearcher
attr_accessor :string
def initialize(string)
@string = string
end
def longest
return unless all.any?
all.max_by(&:length)
View phrases_controller.rb
class PhrasesController < ApplicationController
def index
set_cookies
@phrases_left = avaible_ids(cookies[:showed_ph]).count
@phrases = Phrase.find(cookies_to_array(cookies[:showed_ph]))
end
def random_phrase
all_ids = avaible_ids(cookies[:showed_ph])
@phrases_left = all_ids.count - 1
You can’t perform that action at this time.