Skip to content

Instantly share code, notes, and snippets.

@polozov
polozov / new_test_db.txt
Created October 22, 2014 14:14
Create new test DB
bundle exec rake db:drop RAILS_ENV=test
bundle exec rake db:create RAILS_ENV=test
bundle exec rake db:schema:load RAILS_ENV=test
How to create PostgreSQL database when it was installed with homebrew:
createdb -O[your current user name] -Eutf8 funny_database_name
@polozov
polozov / svn.sh
Last active August 29, 2015 14:03
svn base commands
# игнорить все файлы начинающиеся с ".ruby-" в корневой директории
svn pedit svn:ignore . — для выставления игноров на текущую папку
svn pedit svn:ignore ./folder/ — для выставления игноров на папку folder, которая находится в текущей папке.
svn pedit svn:ignore ".ruby-*" .
# статус svn
svn status
@polozov
polozov / postgres_9.3.sh
Created May 20, 2014 06:10
Updating Postgres 9.1 to 9.3
sudo add-apt-repository ppa:chris-lea/postgresql-9.3
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3
sudo su -l postgres
psql -d template1 -p 5433
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
\q
@polozov
polozov / indicator-brightness.txt
Created January 11, 2014 14:26
Install indicator-brightness
Add the repo:
$ sudo add-apt-repository ppa:indicator-brightness/ppa
Update the repo index:
$ sudo apt-get update
Install indicator-brightness:
$ sudo apt-get install indicator-brightness
@polozov
polozov / .gemrc
Created January 11, 2014 12:36
skip generating RDoc/RI documentation for the gem on install
gem: --no-rdoc --no-ri
@polozov
polozov / pg_hstore.sh
Last active December 29, 2015 15:19
installation PG hstore
rake db:setup
# produces the error below.....hmmm.....it's a no-worky
psql:/yourprojectpath/yourproject/db/structure.sql:29: ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
# hstore postgresql extension needs to be installed, so....
sudo apt-get install postgresql-contrib
# now your extension should be available to enable so log in with psql
psql -d yourproject_production -U yourdbuser -W
# or
@polozov
polozov / .gitconfig
Last active December 26, 2015 02:49
[user]
name = Dmitriy Polozov
email = polozov.dm@gmail.com
[alias]
st = status
ci = commit -m
cii = commit -am
cia = commit --amend -m
ciah = commit --amend -C HEAD
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
},
{ "keys": ["f1"], "command": "toggle_side_bar" },
{ "keys": ["f2"], "command": "toggle_minimap" }
{
"always_show_minimap_viewport": true,
"ensure_newline_at_eof_on_save": true,
// "font_face": "Meslo",
// "font_face": "Liberation Mono",
"font_size": 9,
"highlight_modified_tabs": true,
"hot_exit": true,
"ignored_packages":
[