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
/* | |
* form mail + модальное окно при сабмите | |
*/ | |
$.fn.extend({ | |
diplomMailForm: function(data) { | |
countdown = function (element, seconds, minutes) { | |
var interval; | |
minutes = minutes || 0; | |
seconds = seconds || 5; | |
return interval = setInterval(function () { |
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 | |
/** | |
* класс для работы с робокассой | |
* | |
* PHP version 5.3 | |
* | |
* @author ladamalina | |
* @author Vladimir Chmil <[email protected]> | |
* |
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
/** | |
* получение курса ЦБРФ | |
* | |
* @param $currency | |
* | |
* @return array | |
*/ | |
private function getCBRFCourse($currency) { | |
$date = getdate(); // получаем ассоциативный массив с данными по дате |
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
function db_exists(db_name) { | |
db = db.getSiblingDB('admin'); | |
db.runCommand('listDatabases').databases.forEach(function(db_entry){ | |
if (db_entry.name == db_name) { | |
// quit with exit code zero if we found our db | |
quit(0); | |
} | |
}); | |
// quit with exit code 1 if db was not found |
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
### | |
# ajax подгрузка части формы | |
### | |
$.fn.extend | |
bestdiplomAjaxForm: (options) -> | |
@defaultOptions = | |
### основной селект, объект jQuery ### | |
primarySelect: $('#second') | |
loadTo: $('#ajaxload') |
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
### | |
# форма со связанными селектами | |
# - стилизация (https://github.com/Dimox/jQueryFormStyler) | |
# - цепляем функционал связанных селектов | |
# - геттеры | |
### | |
$.fn.extend | |
bestdiplomForm: (options) -> | |
@defaultOptions = | |
### селектор, к которому будем применять .styler() ### |
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
### | |
# связанные селекты | |
# secondarySelect всегда disabled кроме след. случаев: | |
# - в primarySelect есть значение | |
# - значение primarySelect != 0 | |
### | |
$.fn.extend | |
bestdiplomSelect: (options) -> | |
@defaultOptions = | |
### пустое значение ### |
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
# clone git repository | |
git clone --bare repository.git repoclone | |
cd repoclone | |
git push --mirror new-repository.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
$regionsList = array_map("unserialize", array_unique(array_map("serialize", $regionsList))); |
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
encodeQueryData = (data) -> | |
ret = [] | |
for d of data | |
ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d])) | |
ret.join "&" |