# PS1 with red username (for root)
PS1='\e[0;31m\]\u\e[0m\]@\h:\w\$'
# PS1 with green username (for base user)
PS1='\e[0;32m\]\u\e[0m\]@\h:\w\$'
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 | |
// Show Errors | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
/** | |
* Cyrillic to Latin transliteration via PHP Transliterator class | |
*/ | |
$rus = 'привет'; |
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 | |
/*---------------------------------------- | |
| Инструкции и примеры по работе с PDO | | |
----------------------------------------*/ | |
/** | |
* Подключение к базе данных | |
*/ | |
try { | |
$db = new PDO('mysql:host=localhost;dbname=database;charset=UTF8','user','password'); |
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
/*Прокрутка страницы к заданному элементу*/ | |
$("#button").click(function() { | |
$('html, body').animate({ | |
scrollTop: $("#myDiv").offset().top | |
}, 2000); | |
}); |
NewerOlder