Skip to content

Instantly share code, notes, and snippets.

View maximgatilin's full-sized avatar

Maxim Gatilin maximgatilin

  • @hh.ru
View GitHub Profile
{
"dependencies": {
"react": "16.4.1",
"react-dom": "16.4.1",
"react-redux": "5.0.7",
"react-router": "3.0.5",
"react-router-redux": "4.0.8",
"redux": "^4.0.0"
}
}
@maximgatilin
maximgatilin / checklist.md
Created July 21, 2018 03:28 — forked from askd/checklist.md
Чеклист спикера

Общее

  1. Представься: краткая информация о себе – имя, место работы, чем занимаешься, можно фото для тех, кто будет смотреть слайды отдельно
  2. План доклада: несколько пунктов (лучше не более 5) о чём будет доклад. Это могут быть главы доклада (кстати, составление плана может помочь грамотнее структурировать доклад ещё при создании)
  3. Зачем: кратко рассказать, чем то, о чем рассказываешь в докладе, может быть полезно остальным – и разработчикам, и руководителям, и клиентам (можно акцентироваться на аудитории конкретной конфы – например если там есть дизайнеры, бэкенды, то упомянуть, что они могут узнать из доклада)
  4. Итоги: в конце доклада ещё раз пройтись по плану и подвести итог по каждому пункту – что узнали, чему научились
  5. Контакты: как слушатель и тот кто смотрит слайды может связаться и задать вопрос

Оформление

@maximgatilin
maximgatilin / test
Created July 5, 2018 06:03
git stash patch
git stash show -p stash@{2} > file.patch
{
"dependencies": {
"classnames": "^2.2.5",
"create-react-class": "^15.6.3",
"d3": "3.5.17",
"dat.gui": "^0.7.1",
"draft-js": "^0.10.4",
"draft-js-mention-plugin": "^2.0.1",
"draft-js-plugins-editor": "^2.0.3",
"file-saver": "^1.3.8",
@maximgatilin
maximgatilin / new_gist_file
Created April 24, 2018 12:42 — forked from nielswh/new_gist_file
Kill node.js Process on OSX
ps aux | grep node
kill -9 PID
(Replace PID with the process Id of the Node)
@maximgatilin
maximgatilin / readme.md
Created April 5, 2018 13:22 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@maximgatilin
maximgatilin / rethinkTimezones
Created March 29, 2018 07:41
rethinkTimezones
r
.db('demo')
.table('trends')
.hasFields('Fedora 18')
.merge(ticket => {
const date = r.ISO8601(ticket('sl_created_at')).inTimezone('+05:00');
return {
...ticket,
date: r.time(date.year(), date.month(), date.day(), 'Z')
}
@maximgatilin
maximgatilin / app.js
Created March 25, 2018 15:02
Get file name in node js
const path = require('path'),
scriptName = path.basename(__filename);
console.log(scriptName);
@maximgatilin
maximgatilin / changedProps.js
Last active July 2, 2018 07:48
Just paste this code into react component and see changed props in the console
componentWillReceiveProps(nextProps) {
console.log('--- props changed: ---');
Object.entries(nextProps).forEach(([name, value]) => {
if (this.props[name] !== value) {
console.log(name);
}
});
console.log('---');
}
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file)
second_file = ARGV[1]
branchname = `git branch --no-color 2> /dev/null`[/^\* (.+)/, 1].to_s.downcase
$regex = /#{branchname}/
if !$regex.match(message.downcase)
puts branchname