Skip to content

Instantly share code, notes, and snippets.

@IvikGH
IvikGH / gist:56a2e2c7304f570b2df98f7982d52681
Created April 13, 2017 11:31 — forked from aereal/gist:2802359
Guardfile for Rails with Factory Girl
guard 'rspec', version: 2, cli: File.read('.rspec').each_line.map(&:strip).join(' '), all_after_pass: false, all_on_start: false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
@IvikGH
IvikGH / \lib\systemd\system\sidekiq-static.service
Created February 19, 2017 10:17 — forked from dsadaka/\lib\systemd\system\sidekiq-static.service
systemd unit files for sidekiq service. note backslashes in filenames are really front slashes.
# This file actually fires up multiple sidekiq services.
# to start: systemctl start sidekiq.target
#
[Unit]
Description=Fire up up to 6 sidekiqs
# If you want more than 6 processes, append [email protected], [email protected], etc. to the ExecStart line below
# Note that only as many as have been enabled will actually start.
# Note also that the Unit data for each sidekiq process is in /lib/systemd/system/[email protected]
[Service]
@IvikGH
IvikGH / release_ru.md
Created December 29, 2016 09:53 — forked from davydovanton/release_ru.md
OSSBoard release

Вы давно хотите заняться OpenSource разработкой, но никак не доходят руки?
У вас есть свой проект, но не хватает сил и времени на его поддержку?

На [OSS Board] (http://www.ossboard.org) мы собираем задачи, которые ждут своих героев.

How?

На создание OSS Board меня вдохновили два проекта.

@IvikGH
IvikGH / Links.txt
Created November 15, 2016 11:49 — forked from iBublik/Links.txt
Useful links
@IvikGH
IvikGH / Ruby_Rails_Naming_Conventions.md
Created October 18, 2016 09:49 — forked from alexpchin/Ruby_Rails_Naming_Conventions.md
Ruby & Rails Naming Conventions

Alex's Rails Cheat Sheet

I think the most confusing thing that I have found about Ruby on Rails so far has been the transition from (trying to) write code myself to the use of the fabled "Rails Magic". So, to help my own understanding of a few core Ruby on Rails concepts, I have decided to write something on what I think is a CRITICAL topic... the idea of Convention over Configuration and why (in my mind) it is the most important thing that helps Rails become magic!

(This may be a topic that we cover in more detail in class but as I said, I'm writing this for my own understanding... I hope it helps someone else understand things too... Perhaps you can give me a hand when I'm crying next week!)

##Convention over configuration ###What does this "actually" mean...

@IvikGH
IvikGH / index.html
Created August 28, 2016 13:28 — forked from d3noob/index.html
OSMGeocoder plugin for Leaflet.
<!DOCTYPE html>
<html>
<head>
<title>osmGeocoder Search Plugin for Leaflet Map</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
<link
@IvikGH
IvikGH / fiddle.html
Created July 8, 2016 18:43 — forked from WarFox/fiddle.html
Change html content with vanilla javascript
<div id="myelement">Old Text</div>
module Rss
class DictionaryFilter
# формат входящих данных [{ a: 'one', b: 'two' }, { a: 'one', b: 'three' }, { a: 'five', b: 'six' }]
# формат фильтратора { a: ['one', 'two', 'three', 'four'], b: ['two', 'six'] }
attr_accessor :rss, :applicable
attr_reader :filter
def initialize(rss, filter_data)
@rss = rss
@IvikGH
IvikGH / organizer.rb
Created April 27, 2016 12:47
postfix2
require_relative 'parser'
require_relative 'sender'
class Organizer
attr_reader :filename
attr_accessor :jsons
def initialize(filename)
@filename = filename
@jsons = []
@IvikGH
IvikGH / capybara.md
Created March 15, 2016 09:36 — forked from steveclarke/capybara.md
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)