This file contains 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
Чтобы в Mozilla Firefox убрать надпись «YouTube теперь находится в полноэкранном режиме» нужно: | |
1. В адресную строку браузера наберите «about:config»; | |
2. В строку поиска наберите full-screen-api.warning.timeout; | |
3. Кликните по нему два раза левой кнопкой мыши, значение «3000» сменить на «0». |
This file contains 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
![Иллюстрация к проекту](https://github.com/jon/coolproject/raw/master/image/image.png) | |
![Image alt](https://github.com/{username}/{repository}/raw/{branch}/{path}/image.png) | |
{username} — ваш ник на ГитХабе; | |
{repository} — репозиторий где хранятся картинки; | |
{branch} — ветка репозитория; | |
{path} — путь к месту нахождения картинки. |
This file contains 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
базовые команды | |
git clone адрес репозитория - клонировать репозиторий на локальный компютер | |
git commit -m 'initial commit' комит изменений в локальный репозиторий | |
git push -u origin master - только первый раз отправка изменений в удаленный репозиторий | |
git push - все последующие разы отправка изменений в удаленный репозиторий | |
окат изменений | |
git pull - скачивается актуальная версия удаленного репозитория и все изменения применяются к локальному репозиторию | |
checkout - перейти в другую ветку | |
discard - не отправлять в репозиторий те изменения которые нам не нравятся |
This file contains 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 java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class ReadFileLineByLine { | |
// построчное считывание файла | |
public static void main(String[] args) { |
This file contains 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
Как отправлять исходники в несколько репозиториев одной командой: | |
Создаем новый remote например "all" | |
git remote add "all" git@github.com:username/my-repo.git | |
и добавляем в него несколько адресов для пуша | |
git remote set-url --add --push "all" git@username/my-repo.git | |
git remote set-url --add --push "all" git@bitbucket.org:username/my-repo.git | |
Чтобы запушить сразу в два репозитория |
This file contains 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
SELECT MAX(column_name) + 1 FROM table_name; -- for example max=999 | |
CREATE SEQUENCE table_name_column_name_seq START WITH 999; -- replace 999 with max above | |
ALTER TABLE table_name ALTER COLUMN column_name SET DEFAULT nextval('table_name_column_name_seq'); |
This file contains 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
удалить папку идеи .idea/ из индекса гита | |
git rm -r --cached .idea/ | |
Removed all files that are in the .gitignore | |
git rm --cached `git ls-files -i --exclude-from=.gitignore` | |
git commit -m 'Removed all files that are in the .gitignore' | |
git push origin master |
This file contains 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. Соблюдаем Code style | |
2. Используем только значимые имена переменных, функций и классов | |
3. Следим за орфографией! Это ОООЧЕНЬ ВАЖНО! | |
4. Метод выполняет только одно логическое действие. | |
6. Всегда проверяем в методах входные параметры на валидность | |
7. Думаем о том чтобы пользователю было удобно и понятно | |
как пользоваться программой без руководств пользователя | |
8. Программа не должна падать никогда, | |
обрабатывайте все ошибки пользователя | |
9. DRY (don't repeat yurself) один и тот же код не должен повторятся выносим все в методы |
This file contains 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
git rm -r --cached . | |
git add . | |
git commit -m 'Removed all files that are in the .gitignore' | |
git push origin master |
This file contains 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
указать git хранить ваши данные (логин и пароль) постоянно: | |
git config credential.helper store | |
При этом ваши данные будут храниться в открытом виде в файле .git-credentials. | |
Обнулить настройки этой возможности можно командой: | |
git config --unset credential.helper |
NewerOlder