Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View BumbuKhan's full-sized avatar

Gurban Gurbanov BumbuKhan

  • @Develolper
  • Azerbaijan, Baku
View GitHub Profile
@BumbuKhan
BumbuKhan / utils.css
Last active December 29, 2016 09:08
Prevent mobile browser from resizing text
body{
text-size-adjust: none;
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
}
@BumbuKhan
BumbuKhan / utils.css
Created December 29, 2016 09:32
Class for preventing user select
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Chrome/Safari/Opera */
-khtml-user-select: none; /* Konqueror */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
not supported by any browser */
}
@BumbuKhan
BumbuKhan / git
Last active January 6, 2017 08:13
git remove files from tracking
git rm --cached <file> - Delete file from git and stop tracking. This command also deletes <file> in remote repository
git rm -r --cached <folder> - The same thing but works recursively.
git update-index --assume-unchanged <file> - Use this command to prevent git from detecting changes in <file>
@BumbuKhan
BumbuKhan / composer
Created January 16, 2017 20:06
Composer fix Fxp\Composer\... issue
composer global require fxp/composer-asset-plugin --no-plugins
@BumbuKhan
BumbuKhan / composer
Created January 16, 2017 20:16
Composer update
composer update new/package
@BumbuKhan
BumbuKhan / Yii2
Created January 21, 2017 12:02
Problem with file uploading: finfo_file(C:\...): failed to open stream: No such file or directory
Do
$model->save();
before
$model->file->saveAs()
@BumbuKhan
BumbuKhan / Yii2
Created January 24, 2017 13:02
JavaScript (jQuery) confict with ActiveForm Assets
If any javaScript conflict occurs while using Yii2 ActiveForm widget use this config
ActiveForm::begin([
'enableClientScript' => false
])
@BumbuKhan
BumbuKhan / SASS
Created February 14, 2017 21:32
Border radius @mixin
@mixin border-radius-partial($radius, $part:null) {
@if ($part) {
-webkit-border-#{$part}-radius: $radius;
-moz-border-#{$part}-radius: $radius;
-ms-border-#{$part}-radius: $radius;
border-#{$part}-radius: $radius;
}
@else {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
@BumbuKhan
BumbuKhan / css
Created February 15, 2017 08:08
clearfix
.clearfix::before, .clearfix::after {
content: "";
display: table;
}
.clearfix::after {
clear: both;
}
.clearfix {
@BumbuKhan
BumbuKhan / Yii2
Created February 16, 2017 13:52
How to pass variable to layout
// in controller
Yii::$app->view->params['message_to_layout'] = 'This message will be shown in layout';
// in layout (and in any view!)
<?=$this->params['message_to_layout']?>