Skip to content

Instantly share code, notes, and snippets.

View misteral's full-sized avatar
🏠
Working from home

Aleksandr misteral

🏠
Working from home
View GitHub Profile
@misteral
misteral / broadcasts.rb
Last active October 16, 2023 09:06
Meeting Model in Consulting System
# frozen_string_literal: true
# Broadcasts functions
module Meeting::Broadcasts # rubocop:disable Style/ClassAndModuleChildren
def broadcast_to_replace_customer_text
broadcast_replace_to self, :customer_text,
target: 'customer_text',
partial: 'meetings/customer_text',
locals: { customer_text: customer_text }
end
@misteral
misteral / chime_finish_meetings_service.rb
Last active October 15, 2023 19:11
Service to set archive status for not properly closed meetings with Amazon Chime service.
# frozen_string_literal: true
# It take current open meetings and change state for other
# to achenved
class ChimeFinishMeetingsService
def self.call
new.call
end
def call
@misteral
misteral / gist:3c160a757f0b5b97e3d27f0f131d16c6
Created September 2, 2022 20:48
Rufus-scheduler alive test
# frozen_string_literal: true
require 'test_helper'
class RufusTest < ActionDispatch::IntegrationTest
test 'rufus loading' do
assert_predicate self, :rufus?
end
@misteral
misteral / database.yml
Last active May 22, 2017 05:42
Gist for second_db issue
# config/database.yml.example here because config/database.yml is not in source control and sometimes gets removed when switching between branches
# so this example file is here in case a new config/database.yml file needs to be created
#
default: &default
adapter: postgresql
database: dev
# host: localhost
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
@misteral
misteral / git.md
Created September 12, 2016 07:26 — forked from twoism-dev/git.md
Hybrid Git Flow

Our Git Flow

We are using a simple git flow based on git flow and github flow. We have two branches develop and master.

develop is a representation of staging

master is a representation of production

The Rules

@misteral
misteral / Procfile
Last active April 9, 2016 16:40
Sphinx in dokku
web: bundle exec rails server -p $PORT
sphinxstart: rake ts:run_in_foreground
@misteral
misteral / spninx.conf
Last active April 1, 2016 16:49
sphinx config
source src1
{
type = mysql
sql_host = 172.17.42.1
sql_user = admin
sql_pass =
sql_db = testing
sql_port = 3309
sql_query = select * from test
ApplySyntax.sublime-package
Better CoffeeScript.sublime-package
Better RSpec.sublime-package
BracketHighlighter.sublime-package
ChangeQuotes.sublime-package
Color Highlighter.sublime-package
DocBlockr.sublime-package
GitHub Flavored Markdown Preview.sublime-package
Package Control.sublime-package
Package Syncing.sublime-package
module Services
class UserContactsImport
attr_reader :unparsed_phones
def initialize(user, contacts_list, rewrite)
@user = user
@contact_phones = flat_and_remove_self(contacts_list)
@rewrite = rewrite
@unparsed_phones = []
end
@import 'header';
@import 'home-footer';
html,
body{
color: $itb4-colour;
min-width:320px;
min-height:100%;
font-size: 1em;
height: 100%;