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
@poctek
poctek / lsof
Created July 18, 2016 19:54
Kill server process
lsof -wni tcp:3000
kill -9 59780
@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;"}
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
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'
call plug#begin('~/.vim/plugged')
function! DoRemote(arg)
UpdateRemotePlugins
endfunction
Plug 'Shougo/deoplete.nvim', { 'do': function('DoRemote') }
Plug 'https://github.com/altercation/vim-colors-solarized.git'
Plug 'Raimondi/delimitMate'
@poctek
poctek / .zshrc
Last active August 21, 2016 07:38
# Path to your oh-my-zsh installation.
export ZSH=/Users/poctek/.oh-my-zsh
export EDITOR=nvim
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
export CLASSPATH=$CLASSPATH:$JUNIT_HOME/junit4.10.jar:.
export TERMINFO="$HOME/.terminfo"
# FZF default command
FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
call plug#begin('~/.vim/plugged')
function! DoRemote(arg)
UpdateRemotePlugins
endfunction
Plug 'Shougo/deoplete.nvim', { 'do': function('DoRemote') }
Plug 'https://github.com/altercation/vim-colors-solarized.git'
Plug 'Raimondi/delimitMate'
@poctek
poctek / MySQL.md
Created March 21, 2017 10:11 — forked from nrollr/MySQL.md
Install MySQL on El Capitan using Homebrew

Install MySQL on OS X El Capitan

Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault : bash <(curl -Ls http://git.io/eUx7rg)

However, at the time of writing the script is not compatible with OS X El Capitan (10.11)

Install MySQL using Homebrew

An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"

Make sure Homebrew has the latest formulae, so run brew update first

@poctek
poctek / tmux.md
Created March 22, 2017 20:15 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { reduxForm } from 'redux-form'
import { Input, ButtonInput } from 'react-bootstrap'
import { search, setCustomPhones, setCustomPhonesLocale } from '../actions/followUp'
class QuestionsForm extends Component {
static propTypes = {
questions: PropTypes.arrayOf(PropTypes.object).isRequired,
fields: PropTypes.object.isRequired,