Skip to content

Instantly share code, notes, and snippets.

View taichiman's full-sized avatar

Denis Krivostchokov taichiman

View GitHub Profile
test body 0
test body 1
@taichiman
taichiman / gist:6774406
Created October 1, 2013 05:58
Отзыв о работе с наставником
Занятия с наставником.
Плюсы.
Занятия с наставником помогли мне в выборе правильного направления в реализации программного решения.
Занятия помогли узнать новое и закрепить новые навыки.
Они сэкономили мне время, чтобы самому не изобретать велосипеды.
Они помогли в нахождении наставника, так как в родном городе мало специалистов по выбранной технологии.
Помогло развить мотивацию и самоорганизацию, так как сроков сдачи задачи нет.
Любая поставленная грамотная задача, запускает подсознание в работу, и решения могут начать накапливаться и приходить даже спустя месяцы.
@taichiman
taichiman / gist:6807297
Created October 3, 2013 09:07
My first remote interwiev :)
#a = *(0..10)
#a.delete((rand * 10).to_i)
#z=0
#a.each_with_index do |thing, index|
# if thing != index
# p index
# break
@taichiman
taichiman / gist:7447319
Last active December 28, 2015 05:09
MySQL, mysql
You can reset the root password by running the server with --skip-grant-tables and logging in without a password by running the following as root (or with sudo):
# service mysql stop
# mysqld_safe --skip-grant-tables &
$ mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("YOUR-NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
@taichiman
taichiman / gist:7563844
Last active December 28, 2015 21:19
Deploy: rails+rvm+unicorn+nginx for staging and production space
First, add Unicorn to your app’s Gemfile:
gem 'unicorn'
a.Run bundle install to set up your bundle locally.
b. Create a configuration file for Unicorn at config/unicorn.rb
c. Create pid and shared paths on server
===
Check concurrency paths in nginx.conf and unicorn.rb
@taichiman
taichiman / gist:7600797
Created November 22, 2013 14:35
ERROR: Failed to build gem native extentions
nokogiri (1.5.10)
sudo apt-get install libxml2-dev
I also needed:
sudo apt-get install libxslt-dev
===
mysql2 (0.3.11)
@taichiman
taichiman / deploy.rb
Created November 25, 2013 09:15 — forked from reu/deploy.rb
# Bundler Integration
require "bundler/capistrano"
# Application Settings
set :application, "yourapplicationname"
set :user, "serveruser"
set :deploy_to, "/home/#{user}/rails-applications/#{application}"
set :rails_env, "production"
set :use_sudo, false
set :keep_releases, 3
MySQL:
sudo apt-get install mysql-server mysql-client
@taichiman
taichiman / gist:7689184
Created November 28, 2013 09:13
figaro
application.yml
===
# Add application configuration variables here, as shown below.
#
# PUSHER_APP_ID: "2954"
# PUSHER_KEY: 7381a978f7dd7f9a1117
# PUSHER_SECRET: abdc3b896a0ffb85d373
# STRIPE_API_KEY: EdAvEPVEC3LuaTg5Q3z6WbDVqZlcBQ8Z
# STRIPE_PUBLIC_KEY: pk_BRgD57O8fHja9HxduJUszhef6jCyS
@taichiman
taichiman / gist:7747280
Last active December 30, 2015 00:09
Git, git, git
Commit:
git diff --check (убирает whitespace)
==
git update-index --assume-unchanged <file>
git update-index --no-assume-unchanged <file>
==