Skip to content

Instantly share code, notes, and snippets.

View Yipee-ki-yay's full-sized avatar
🎯
Focusing

Oleksandr Morozov Yipee-ki-yay

🎯
Focusing
View GitHub Profile
{
"window.zoomLevel": 1,
"workbench.editor.showTabs": true,
"editor.tabSize": 2,
"workbench.statusBar.feedback.visible": false,
"window.menuBarVisibility": "toggle",
"workbench.activityBar.visible": false,
"editor.minimap.enabled": false,
"files.defaultLanguage": "html",
"workbench.editor.tabSizing": "shrink",
@Yipee-ki-yay
Yipee-ki-yay / js_validationForm.js
Last active February 17, 2020 10:20
js validationForm module
ValidationModule = (function() {
function validate(inputElement, validationsArray) {
const validations = validationsArray;
let messages = [];
function isNumber(input) {
return !isNaN(parseFloat(input.value)) && isFinite(input.value);
}
function isEmail(input) {
@Yipee-ki-yay
Yipee-ki-yay / mixin_arrow_border.scss
Last active October 17, 2018 07:58
mixin arrow border
@mixin arrow($direction: down, $size: 5px, $color: #555) {
width: 0;
height: 0;
@if ($direction == left) {
border-top: $size solid transparent;
border-bottom: $size solid transparent;
border-right: $size solid $color;
}
@else if ($direction == right) {
border-top: $size solid transparent;
@Yipee-ki-yay
Yipee-ki-yay / mixin_center.scss
Last active October 17, 2018 08:29
mixin position center
@mixin center($position) {
position: absolute;
@if $position == 'vertical' {
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
@else if $position == 'horizontal' {
@Yipee-ki-yay
Yipee-ki-yay / mixin_font_face.scss
Last active October 17, 2018 08:41
mixin for including fonts for font-face
@mixin font-face($font-name, $file-name, $weight: normal, $style: normal) {
@font-face {
font-family: quote($font-name);
src: url($file-name + '.eot');
src: url($file-name + '.eot?#iefix') format('embedded-opentype'),
url($file-name + '.woff') format('woff'),
url($file-name + '.ttf') format('truetype'),
url($file-name + '.svg##{$font-name}') format('svg');
font-weight: $weight;
font-style: $style;
@Yipee-ki-yay
Yipee-ki-yay / mixin_aspect_ratio.scss
Created October 17, 2018 08:12
mixin aspect-ratio
@mixin aspect-ratio($width, $height) {
position: relative;
&:before {
display: block;
content: "";
width: 100%;
padding-top: ($height / $width) * 100%;
}
> .inner-box {
position: absolute;
@Yipee-ki-yay
Yipee-ki-yay / mixin_text_shorten.scss
Created October 17, 2018 08:15
mixin text-shorten
@mixin text-shorten {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* begin mixin grid */
$columns: 12;
$atom: (100% / $columns);
$break_xs: 576px;
$break_sm: 720px;
$break_md: 992px;
$break_lg: 1200px;
$offset: 15px;
@Yipee-ki-yay
Yipee-ki-yay / .env
Last active March 6, 2019 12:57
.env
APP_NAME=Poputi
APP_ENV=local
APP_KEY=base64:59fCCVQ2O9v4Znp86koSAuXg2N2lTuVj1m+ApJ91lS8=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=localhost
@Yipee-ki-yay
Yipee-ki-yay / instruction.txt
Last active December 16, 2019 10:15
how to init project on local server
1. Добавить каталог в html
2. Прописать ip в etc/hosts
3. Добавить conf файл в etc/apache2/sites-available (sudo cp /etc/apache2/sites-available/energy.full.conf /etc/apache2/sites-available/technostock.loc.conf)
4. Добавить conf файл в etc/apache2/sites-enabled (sudo a2ensite caps.full.conf)
5. Перезапустить апач (sudo service apache2 restart)
6. Настроить .env, .htaccess
7. Создать БД http://localhost/phpmyadmin/
8. Уточнить права доступа в определенной директории (sudo chmod -R 777 *)
9. Установить пакеты (composer install)
10. Сгенерировать ключ для приложения (php artisan key:generate)