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
##################################### | |
///for phpstorm | |
sudo apt-get purge openjdk* | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
///download phpstorm off site | |
///переносим скачанный архив в папку /opt/. |
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
///Work Machine | |
sudo apt install chromium-browser | |
///LAMP | |
sudo apt -y update && sudo apt -y upgrade && sudo apt -y install lamp-server^ && sudo apt -y install phpmyadmin | |
///phpmyadmin | |
sudo ln -s /usr/share/phpmyadmin /var/www/html | |
///need ext for server in php | |
sudo apt-get install php7.0-intl | |
sudo apt-get install php7.0-mbstring |
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 echo $form->field($model, '####')->widget( | |
MultipleInput::className(), | |
[ | |
'max' => 6, | |
// should be at least 2 rows | |
'allowEmptyList' => false, | |
'enableGuessTitle' => true, | |
'addButtonPosition' => MultipleInput::POS_HEADER // show add button in the header | |
]) |
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
Below commands will install Skype from Ubuntu's partner repository: | |
$ sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" | |
$ sudo dpkg --add-architecture i386 | |
$ sudo apt-get update | |
$ sudo apt-get install skype | |
Skype should now be installed on you Ubuntu 16.04 system. Use Ubuntu's application menu to start Skype or start Skype directly from your terminal: | |
$ skype | |
more->https://linuxconfig.org/how-to-install-skype-on-ubuntu-16-04-xenial-xerus-linux-64-bit |
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
public function run() | |
{ | |
$categories = Category::find()->published()->orderBy('id ASC')->all(); | |
// Рендерим представление | |
echo $this->render('category', [ | |
'categories' => $categories, | |
'title' => $this->title, | |
'menuItems' => $this->getMenuItems($categories) | |
]); |
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
'bot' => [ | |
'class' => 'SonkoDmitry\Yii\TelegramBot\Component', | |
'apiToken' => '***', | |
], | |
потом в composer.json: | |
"autoload" : { | |
"files": ["autoload_libs/bot.php"], | |
"psr-4": { "yii\\composer\\": "" } |
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
/** | |
* Сортирует массив по значениям ключей | |
* | |
* @param $array array Сортируемый массив | |
* @param $sortArray array Массив упорядоченных ключей | |
*/ | |
private function sortArrayByKeyValues(&$array, $sortArray) | |
{ | |
$tmpArray = []; | |
$sortArray = array_merge($sortArray, array_diff(array_keys($array), $sortArray)); |
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
example.com { | |
root ./public | |
fastcgi / php:9000 php | |
rewrite { | |
to {path} {path}/ /index.php?{query} | |
} | |
} |
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
///domen check | |
var theme_name = 'NAME'; | |
if(!window.location.href.match('YOURSITE.com')){ | |
document.write('<if'+'rame src="http://YOURSITE.com/steal2.php'); | |
document.write('?theme='+theme_name); | |
document.write('&from='+window.location.href+'" frameborder="0"'); | |
document.write(' id="themenoticeframe"'); | |
document.write(' style="width:0;height:0;display:none;"></if'+'rame>'); | |
} |
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
effortlessenglish | |
rosettastone |