Skip to content

Instantly share code, notes, and snippets.

View alexxty7's full-sized avatar

Alexandr Katulskiy alexxty7

View GitHub Profile
@alexxty7
alexxty7 / index.md
Created January 31, 2016 11:16 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@alexxty7
alexxty7 / capybara cheat sheet
Created May 31, 2016 10:39 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
"advanced-open-file":
prettyName: "Advanced Open File"
homepage: "https:/atom.io/packages/advanced-open-file"
"auto-indent":
prettyName: "Auto Indent"
homepage: "https:/atom.io/packages/auto-indent"
"autoclose-html":
prettyName: "Autoclose Html"
homepage: "https:/atom.io/packages/autoclose-html"
"clipboard-plus":
1. yarn add sass-loader node-sass --dev
webpack.config.dev.js
2. {
test: /\.scss$/,
use: [
"style-loader", "css-loader", "sass-loader"
]
}
@new_window = window_opened_by do
click_link 'System Requirements'
end
within_window(@new_window) do
page.current_url == LIVE_WEBINAR_URL
end
@alexxty7
alexxty7 / vs_code_settings.json
Last active March 4, 2018 12:32
VS Code Settings
{
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.tabSize": 2,
}
@alexxty7
alexxty7 / fzf
Created March 4, 2018 12:55
fzf
git checkout $(git branch | fzf)
const maxByLength = (array) => {
if (!array.length) return [];
return array.sort((a, b) => b.length - a.length)[0];
}
const match = (pattern, text) => {
let tokens = pattern.toLowerCase().split(' ');
let textToSearch = text.toLowerCase();
let groups = [];
@alexxty7
alexxty7 / other.rb
Last active February 6, 2019 16:29
names.select(&'John'.method(:==))
require 'uri'
HTTP_FORMAT = URI.regexp(%w(http https))
@alexxty7
alexxty7 / gitflow-breakdown.md
Created February 8, 2019 12:13 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository