Skip to content

Instantly share code, notes, and snippets.

@aminin
aminin / Правила.md
Created August 29, 2011 19:45
Правила

Правила

Для инфраструктуры

  • Есть одна система, а не набор систем.
  • Желаемое состояние системы должно иметь численное выражение.
  • Это “численное выражение” должно быть машинно измеримым.
  • Текущее состояние системы должно само исправляться до желаемого состояния.
@aminin
aminin / install.sh
Created January 15, 2013 09:30
English Russian Full Dictionary for Stardict on Ubuntu 12.04
# Установка англо-русского словаря на Ubuntu
sudo apt-get install stardict
wget http://sourceforge.net/projects/xdxf/files/dicts-stardict-form-xdxf/002c/stardict-comn_sdict05_eng_rus_full-2.4.2.tar.bz2/download
tar -xjf download
sudo mv stardict-eng_rus_full-2.4.2/ /usr/share/stardict/dic/
sudo chmod -R a+r /usr/share/stardict/dic/
# Спасибо http://forum.ubuntu.ru/index.php?topic=2587 и http://sourceforge.net/projects/xdxf/
@aminin
aminin / README.md
Created October 20, 2011 09:50
Разворачивание проекта с помощью Phing

Использование Phing

Общие замечания

Директория с проектом на продуктовом сервере имеет следующую структуру:

<директория с проектом на сервере>

current Ссылка на ./versions/release-002

@aminin
aminin / git.md
Last active October 30, 2019 21:48
RTFM по Git. Отрыл в старых записях.

Правила работы с Git

Источники

Имена и адреса авторов правок

@aminin
aminin / icu-install.sh
Last active October 11, 2019 15:57
Install ICU from source and build php-intl with the specific version of ICU
#!/usr/bin/env bash
if [[ -x $(which php) ]]; then
PHP_ICU_VERSION=$(php -r 'echo defined("INTL_ICU_VERSION") ? INTL_ICU_VERSION : "none";')
echo "PHP ICU version: $PHP_ICU_VERSION"
else
echo 'WARNING: PHP not installed'
PHP_ICU_VERSION=none
fi
@aminin
aminin / run-symfony-with-xdebug.md
Last active May 4, 2019 15:33
Run symfony application with xdebug

PHP and IDE configuration

Assume we already configured xdebug (otherwise use google).

Symfony 2.x

Shell command

This code is very similar to the command executed internally by php app/console server:run.

@aminin
aminin / create_mysql_db.sh
Last active April 18, 2018 09:33
Shell scripts for managing local websites under Apache web-server. Valid for Ubuntu 14.04.
#!/bin/bash
if [[ "$DB_NAME" == "" ]]; then
echo "Error: DB_NAME is not set"
exit 1
fi
if [[ "$DB_PASSWORD" == "" ]]; then
echo "Error: DB_PASSWORD is not set"
exit 1
fi
@aminin
aminin / subtree-split.sh
Last active March 16, 2018 16:00
Split project with multiple composer packages into subtrees
#!/usr/bin/env bash
# Search composer packages in SRC_PATH
# and split them into subtrees
#
# examples:
# bash subtree-split.sh
# SRC_PATH=bundles bash subtree-split.sh
#
# see:
@aminin
aminin / branch-killer.sh
Created June 29, 2012 10:51
Убийца слитых веток
#!/bin/bash
# Чистит локальные слитые ветки
for i in `git branch | grep "^[^*]\+"`; do git branch -d $i; done;
# Чистит слитые ветки в удалённом репозитории
git log --pretty=format:%H HEAD~1 > /tmp/git-history.txt
for i in `git br -r | grep -o "[^ \/]\+$" | sort | uniq`;
do
@aminin
aminin / .gitignore
Created May 11, 2012 11:25
Vagrant box builder for ubuntu-12.04
build/
*.box
*.iso