Skip to content

Instantly share code, notes, and snippets.

View poctek's full-sized avatar
🏄‍♂️
Most likely writing code

Rostislav Katin poctek

🏄‍♂️
Most likely writing code
View GitHub Profile
call plug#begin('~/.vim/plugged')
Plug 'https://github.com/altercation/vim-colors-solarized.git'
Plug 'Raimondi/delimitMate'
Plug 'othree/html5.vim'
Plug 'othree/javascript-libraries-syntax.vim', { 'for': 'javascript' }
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'tomtom/tcomment_vim'
it "shouldn't create treatment" do
allow(DPDMessageSender).to receive(:send)
expect do
expect do
subject.new(invalid_params).handle
end.to raise_error(ActiveRecord::Rollback)
end.not_to change(Treatment, :count)
end
@poctek
poctek / itis_checker.rb
Last active July 24, 2016 20:22
Script to check my application
require "mechanize"
require "open-uri"
agent = Mechanize.new
page = agent.get("http://abiturient.kpfu.ru/entrant/abit_entrant_originals_list?p_open=&p_faculty=47&p_speciality=375&p_inst=0&p_typeofstudy=1")
table = page.search("body table tr")
result = table.select { |tr| tr.attributes["style"].to_s == "font-weight:bold;"}
@poctek
poctek / lsof
Created July 18, 2016 19:54
Kill server process
lsof -wni tcp:3000
kill -9 59780