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
Установка | |
npm install -g browser-sync | |
Команда для запуска browser-sync: | |
browser-sync start --server --files "php/*.php,css/*.css,js/*.js,html/*.html,*.*" |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Сетка адаптивная</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<section> |
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
Math.floor((Math.random() * 10) +1); |
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
JavaScript в консоли Sublime Text | |
Чтобы запускать тестовые куски кода javascript прямо в текстовом редакторе sublime text, не открывая браузер для просмотра вывода функции, эта короткая инструкция может быть полезной. | |
Вот так выглядит полученный результат: | |
Есть несколько способов сделать это, однако, дабы не рассматривать их все, остановимся на кроссплатформенном варианте. Поможет в этом Node.js. | |
Предполагается, что вы уже используете node и имеете представление о том, что это. Если это не так, вам сюда. |
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 | |
Качаем https://git-for-windows.github.io | |
При работе если нужно создать новый репозирорий | |
Задаём емаил git config --global user.email "[email protected]" | |
Задаём логин git config --global user.name "Your Name" | |
1. Заходим на git и создаём репозиторию например test | |
2. git init (Находясь в папке Иницилизируем рабочаю папку) | |
3. git remote add origin https://github.com/gunaevart/test.git (Находясь в папке Сопоставляем наш пакет с удалённым репозиторием) |
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
?> | |
<tr rel="<? echo $result['status']; ?>" value="<? echo $result['id']; ?>"> | |
<td><? echo $result['name']; ?></td> | |
<td><? echo $result['fname']; ?></td> | |
<td><? echo $result['phone']; ?></td> | |
<td><? echo $result['sity']; ?></td> | |
<td><? echo $result['grabli']; ?></td> | |
<td><? echo $result['coment']; ?></td> | |
<td><? echo $result['date']; ?></td> | |
<td><div class="status"><? echo $result['status']; ?></div></td> |
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
/JavaScript Задаём цвета строк разных статусов заказа | |
$('tr[rel="Новое"]').css({"background":"rgb(0, 122, 22)", "padding":"3px", "color":"#fff"}); | |
$('tr[rel="Старое"]').css({"background":"rgb(188, 188, 188)", "padding":"3px", "color":"#fff"}); | |
//JavaScript функция изменения статуса заказа | |
$(".ok").on("click", function() { | |
$(this).parents('tr').css({"background":"rgb(255, 0, 0)", "padding":"3px", "color":"#fff"}).attr('rel', 'Старое'); |
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
$total = $Fname.' | '.$Ffio.' | '.$Fphone.' | '.$Fmail .' | '. $date; | |
$filess = file_put_contents("data.txt","\n$total",FILE_APPEND); | |
if($filess == true){ | |
echo 'Ваша заявка на обратный звонок успешно отправлена!'; | |
} |
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
<script> | |
$.ajax({ | |
url: 'hello.php?action=hello', // куда посылаем запрос | |
type: "POST", | |
data: {'log':'lol','pass':'111'}, | |
success: function(data){ // что делаем в случае успеха, в data лежит ответ от сервера | |
alert(data); // выводим ответ | |
if(data == 'okey'){ | |
alert("Hello =)"); | |
}else{ |
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
AllAutocomplete | |
BracketHighlighter | |
AutoFileName | |
ColorPicker | |
SublimeCodeIntel | |
https://habrahabr.ru/post/235901/ |