Сообщения

Complete move of remote Git repository

I encountered the following interesting task at my job. We move all our git-repositories from our remote server to our brand-new instance of GitLab.   Obviously, simple git clone and git push to a new remote is not exactly what we want. We have way more remote branches on remote and for the branches a have locally they are not all on the current stage. The solution would be to check put every branch and pull it. The same with tags, we have a lot.  The same for push. Simple git push pushes only one specific branch at a time.  It comes to a big pile of boring operations giving that we have about 20 repos.  What I've found is git clone --bare command and git push --mirror  Let's take a look at the example git clone --bare https://github.com/ exampleuser / old-repository .git git push --mirror https://github.com/ exampleuser / new-repository .git See official docs from GitHub https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating...

Онлайн инструмент для построения диаграмм и визуализаций LUCID

 lucid.app https://miro.com/  констуктор чек листов  https://my.365done.ru/thirty-days-challenge

БД просто

Что такое транзакция в БД https://habr.com/ru/post/537594/ Блокировка транзакций  https://okiseleva.blogspot.com/2012/01/blog-post_30.html 

Пост каждый день. Когда работаешь над проектом один.

Изображение
 Здесь вот парень рассказывает, что что-то лучше чем ничего 1>0.  https://www.youtube.com/watch?v=fnm02VXdCN0&feature=emb_logo&ab_channel=RyanOng Он за один год сделал 365 постов про NLP. Тоесть целый год выдерживал правило пост каждый день.  Интересная идея, хоть и не считаю её реалистичной для себя. Думаю это верный путь в выгоранию) Но, например, пост в неделю это интересно. Это позволит: 1. быть в тонусе 2. отслеживать прогресс 3. гарантированно иметь какие-то результаты собранные более или менее в одном месте Выходит что это такой само-менеджерский инструмент.  А что если пойти дальше и адоптировать некоторые инструменты Аджайла и применять их к себе. Например, каждое утро заполнять табличку, что сделал, что буду делать, что мешает.   

git merge --strategy=ours

Ветка в котороай я работал стала по сути мастер веткой. Однако настоящая мастер ветка не может быть смеджена с ней, так как в ней тоже есть изменения, но они мне не нужны.  Задача. Все изменения из текущей ветки перенести в ветку мастер, при этом затереть все, что было сделано в мастере после ответвления это новой ветки. Другими словами сделать мою ветку мастером, а мастер удалить. (технически делается не так, но по результату похоже)  Решение Для этого идеально походит следующий набор команд  git checkout better_branch git merge --strategy=ours master # keep the content of this branch, but record a merge git checkout master git merge better_branch # fast-forward master up to the merge https://stackoverflow.com/questions/2763006/make-the-current-git-branch-a-master-branch# MERGE STRATEGIES The merge mechanism ( git merge  and  git pull  commands) allows the backend  merge strategies  to be chosen with  -s  option. Some str...

SQL

Изображение
Part I. Create a database   login into Postgres sudo -u postgres psql  show databases command to see all databases \l to create database shop just enter  create database shop; Now I want to see that we really have created the database shop. "shop" must be in the list \l Let's continue with the shop database we have just created. For that, we need to connect the shop database  \c shop See what is in the database. So far it should be "Did not find any relations" since we did not add anything to it.  \d Let's create our first table named CUSTOMER by typing following  create table customer( id serial primary key, name varchar(255), phone varchar(30), email varchar(255) ); You can type it in one line if you like. Check if the table has been created. Now the list should contain created database.   \d Let's see more details about our first just created table CUSTOMER. \d customer Now it's time to create table PRODUCT ...

pgAdmin export, сохранение результатов запроса в файл .csv; проблема дефолтных настроек при переходе с pgAdmin3 на pgAdmin4

Изображение
ЗАДАЧА Изменить формат при сохранении результатов запроса в файл .csv При переходе с pgAdmin3 на PgAdmin4 экспорт результатов исполнения скриптов стал выполнятся в .csv f файл, где сепоратор это запятая, а пропущенные значения записаны как NULL. Проблема в том, что до этого экспорт результатов в файл из pgAdmin выполнялся с сепаратором ";", а путные значения были пустыми строками.  Solutin 1) File -> Preferences  2) Query Tool -> CSV/TXT Output Готово