This file contains hidden or 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
#!/usr/bin/env bash | |
MODULE_DIR="module" | |
TEST_DIR="/test" | |
DOCS_DIR="/docs" | |
COVERAGE_DIR=$PWD"/docs/coverage/" | |
COVERAGE_INDEX=$COVERAGE_DIR$MODULE_DIR"/index.html" | |
BOOTSTRAP_FILE="Bootstrap.php" | |
PHPUNIT_FILE="phpunit.xml" |
This file contains hidden or 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
find . -type f -name *.php -exec wc -l {} \; | awk '{print $1};' | awk '{s+=$1} END {print s}' |
This file contains hidden or 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
sudo ssh -Nfg -L 80:localhost:8080 localhost |
This file contains hidden or 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 checkout -b branch_name | |
# затягиваем PR в локальную ветку. 123 - номер PR; origin - имя remote, где открыт PR | |
git pull origin refs/pull/123/head |
This file contains hidden or 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
<style> | |
.thumb { | |
height: 75px; | |
border: 1px solid #000; | |
margin: 10px 5px 0 0; | |
} | |
</style> | |
<input type="file" id="files" name="files[]" multiple /> | |
<output id="list"></output> |
This file contains hidden or 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 | |
define('T', ' '); | |
define('N', PHP_EOL); | |
$functions = array(); | |
$classes = array(); | |
$constant_prefix = 'X_'; | |
$php = '<?php' . N; |
This file contains hidden or 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
<a href="http://vk.com/share.php?url=URL&title=TITLE&description=DESC&image=IMG_PATH&noparse=true" target="_blank" onclick="return Share.me(this);"> {шарь меня правильно}</a> | |
<a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5Btitle%5D=TITLE&p%5Bsummary%5D=DESC&p%5Burl%5D=URL&p%5Bimages%5D%5B0%5D=IMG_PATH" target="_blank" onclick="return Share.me(this);">{шарь меня правильно}</a> | |
<a href="http://connect.mail.ru/share?url=URL&title=TITLE&description=DESC&imageurl=IMG_PATH" target="_blank" onclick="return Share.me(this);">{шарь меня правильно}</a> | |
<a href="http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st.comments=DESC&st._surl=URL" target="_blank" onclick="return Share.me(this);">{шарь меня правильно}</a> | |
<a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Ffiddle.jshell.net%2F_display%2F&text=TITLE&url=URL" target="_blank" onclick="return Share.me(this)">{шарь меня правильно}</a> |
This file contains hidden or 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
// Пример кнопок с минимальной настройкой | |
<p>Поделиться: | |
<button class="social_share" data-type="vk">ВКонтакте</button> | |
<button class="social_share" data-type="fb">Facebook</button> | |
<button class="social_share" data-type="tw">Twitter</button> | |
<button class="social_share" data-type="lj">LiveJournal</button> | |
<button class="social_share" data-type="ok">Одноклассники</button> | |
<button class="social_share" data-type="mr">Mail.Ru</button> | |
</p> |
This file contains hidden or 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 update-index --assume-unchanged <имяфайла> |
This file contains hidden or 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 | |
class My_Auth_Adapter_Doctrine2 implements Zend_Auth_Adapter_Interface | |
{ | |
/** | |
* Doctrine Entity Manager | |
* | |
* @var \Doctrine\ORM\EntityManager | |
*/ | |
protected $_em = null; |