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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
// With Flutter, you create user interfaces by combining "widgets" | |
// You'll learn all about them (and much more) throughout this course! | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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
Команды для билда контейнера: | |
docker build -t registry.gitlab.com/staqru/staq -f docker/php-fpm-build/Dockerfile . | |
docker login registry.gitlab.com | |
docker push registry.gitlab.com/staqru/staq | |
docker-compose up | |
Для того, чтобы появились таблицы: | |
docker-compose exec php php artisan migrate |
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
/** | |
* Plural forms for russian words | |
* @param {Integer} count quantity for word | |
* @param {Array} words Array of words. Example: ['депутат', 'депутата', 'депутатов'], ['коментарий', 'коментария', 'комментариев'] | |
* @return {String} Count + plural form for word | |
*/ | |
function pluralize(count, words) { | |
var cases = [2, 0, 1, 1, 1, 2]; | |
return count + ' ' + words[ (count % 100 > 4 && count % 100 < 20) ? 2 : cases[ Math.min(count % 10, 5)] ]; | |
} |
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
1. cd /var/www/html/docker | |
2. sudo docker-compose up -d | |
how to make composer install or php artisan migrate on site: | |
1. sudo docker ps | |
2. ищешь docker_app, и берешь CONTAINER ID, копируешь его | |
3. sudo docker exec -ti 8d8942597c2d /bin/bash | |
4. cd excursions.back/ | |
5. composer install |
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 extend(parent, child) { | |
var i; | |
child = child || {}; | |
for (i in parent) { | |
if(parent.hasOwnProperty(i)) { | |
child[i] = parent[i]; | |
} | |
} | |
return child; |
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
MYAPP.utilities.array = (function() { | |
// зависимости | |
var uobj = MYAPP.utilities.object, | |
ulang = MYAPP.utilities.lang, | |
// частные свойства | |
array_string = "[object Array]", | |
ops = Object.prototype.toString; | |
// частные методы |
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 Parent(name) { | |
this.name = name || 'Adam'; | |
} | |
// добавление дополнительной функциональности в прототип | |
Parent.prototype.say = function() { | |
return this.name; | |
} |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "ctrl+shift+q", | |
"command": "workbench.action.quickOpenView" | |
}, | |
{ | |
"key": "ctrl+shift+i", | |
"command": "xandeer.aligncode", | |
"when": "editorTextFocus" |
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
{ | |
"plugins": [ | |
"stylelint-order" | |
], | |
"rules": { | |
"at-rule-empty-line-before": [ "always", { | |
except: [ | |
"blockless-after-same-name-blockless", | |
"first-nested", | |
], |
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
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) |
NewerOlder