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
str=$(cat <<'EOF' | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
EOF | |
) |
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('OAUTH2_CLIENT_ID', ''); | |
define('OAUTH2_CLIENT_SECRET', ''); | |
$authorizeURL = 'https://github.com/login/oauth/authorize'; | |
$tokenURL = 'https://github.com/login/oauth/access_token'; | |
$apiURLBase = 'https://api.github.com/'; | |
session_start(); |
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
By setting the input field to readonly="true" you should prevent anyone typing anything in it, but still be able to launch a click event on it. | |
This is also usefull in non-mobile devices as you use a date/time picker |
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
-webkit-appearance: none; |
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
// Placeholder @mixin for Sass | |
// | |
// A mixin to style placeholders in HTML5 form elements. | |
// Includes also a .placeholder class to be used with a polyfill e.g. | |
// https://github.com/mathiasbynens/jquery-placeholder | |
// Requires Sass 3.2. | |
// | |
// Example usage (.scss): | |
// | |
// input { |
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
$("#some_id") | |
.autocomplete({ | |
... | |
}).data("ui-autocomplete")._renderItem = function (ul, item) { ... }; | |
If you want to create the _renderItem function for multiple autocompletes with id #some_id just use it in the create event: | |
$('#some_id').autocomplete({ | |
create: function() { | |
$(this).data('ui-autocomplete')._renderItem = function (ul, item) { ... }; |
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
/** | |
* @static Вызов хранимой процедуры | |
* @param $sp_name Название хранимой процедуры | |
* @param $params | |
* @return array | |
*/ | |
public static function Query($sp_name, $params) | |
{ | |
// Получаем CommandBuilder | |
$b = Yii::app()->db->getCommandBuilder(); |
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 | |
# Usage: | |
# ./git_move.sh git@repo_site.com:/my_repo.git origin/folder/path/ /destination/repo/path/ new/folder/path/ | |
repo=$1 | |
folder=$2 | |
dest_repo=$3 | |
dest_folder=$4 | |
clone_folder='__git_clone_repo__' |
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
/** | |
* Возвращает модель основываясь на первичном ключе полученном из GET переменной, | |
* если модель не найдена, кидает HTTP исключение. | |
* @param string $type тип модели | |
* @param int $id первичный ключ | |
* @param string $errorMessage [optional] сообщение об ошибке | |
* @param int $errorNum [optional] код HTTP ошибки | |
* @return CActiveRecord модель полученную с помощью первичного ключа. | |
* @throws CHttpException | |
*/ |
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 | |
/** | |
* global.php file. | |
* Global shorthand functions for commonly used Yii methods. | |
* @author Christoffer Niska <[email protected]> | |
* @copyright Copyright © Christoffer Niska 2013- | |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License | |
*/ | |
defined('DS') or define('DS', DIRECTORY_SEPARATOR); |