Skip to content

Instantly share code, notes, and snippets.

Avatar

Gurban Gurbanov BumbuKhan

View GitHub Profile
@BumbuKhan
BumbuKhan / utils.css
Last active Dec 29, 2016
Prevent mobile browser from resizing text
View utils.css
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 Dec 29, 2016
Class for preventing user select
View utils.css
.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 Jan 6, 2017
git remove files from tracking
View git
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 Jan 16, 2017
Composer fix Fxp\Composer\... issue
View composer
composer global require fxp/composer-asset-plugin --no-plugins
@BumbuKhan
BumbuKhan / composer
Created Jan 16, 2017
Composer update
View composer
composer update new/package
@BumbuKhan
BumbuKhan / Yii2
Created Jan 24, 2017
JavaScript (jQuery) confict with ActiveForm Assets
View Yii2
If any javaScript conflict occurs while using Yii2 ActiveForm widget use this config
ActiveForm::begin([
'enableClientScript' => false
])
View SASS
@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;
View css
.clearfix::before, .clearfix::after {
content: "";
display: table;
}
.clearfix::after {
clear: both;
}
.clearfix {
@BumbuKhan
BumbuKhan / Yii2
Created Feb 16, 2017
How to pass variable to layout
View Yii2
// 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']?>
@BumbuKhan
BumbuKhan / Notepad++
Created Feb 17, 2017
How to use found by regex string in replacement
View Notepad++
Find: <\?= ?Yii::t\('app',\ '(.*)'\);? ?\?>
Replace with: \1
You can’t perform that action at this time.