This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//...your silex bootstrap. | |
//Configure Swiftmail to use SMTP. | |
$app->register(new SwiftmailerExtension(), array( | |
'swiftmailer.options' => array( | |
'host' => 'smtp.gmail.com', | |
'port' => 465, | |
'username' => '[email protected]', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Функция для склонения слов | |
* Пример использования: cnDeclination(5,'комментари|й|я|ев') | |
* | |
* @author Павел Белоусов <pb@info-expert.ru> | |
* | |
* @param int number число, для которого будет расчитано окончание | |
* @param string words слово и варианты окончаний для 1|2|1 (1 комментарий, 2 комментария, 100 комментариев) | |
* | |
* @return string - слово с правильным окончанием |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and php56-FPM | |
sudo yum install -y nginx php56-fpm | |
# Install php56 extensions | |
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap |