Skip to content

Instantly share code, notes, and snippets.

Расширяемые функциональные эффекты против объектно-ориентированных интерфейсов.

С большим опозданием, продолжаю цикл статей про WP бота. Ссылки на предыдущие части: 1, 2 3 и 4. Сегодня, впрочем как обычно, речь пойдет про очедную функциональную дичь ;).

Столпом ООП является инкапсуляция (каждый раз тянет по английски это слово с i начать), которая про "сокрытие реализации". Даже самому начинающему программисту известно, что достигается инкапсуляция в mainstream языках программирования при помощи interface-ов. Я постараюсь показать совершенно иной способ инкапсуляции – экзистенциальные эффекты.

Что за а

Расширяемые функциональные эффекты против объектно-ориентированных интерфейсов.

С большим опозданием, продолжаю цикл статей про WP бота. Ссылки на предыдущие части: 1, 2 3 и 4. Сегодня, впрочем как обычно, речь пойдет про очедную функциональную дичь ;).

Столпом ООП является инкапсуляция (каждый раз тянет по английски это слово с i начать), которая про "сокрытие реализации". Даже самому начинающему программисту известно, что достигается инкапсуляция в mainstream языках программирования при помощи interface-ов. Я постараюсь показать совершенно иной способ инкапсуляции – экзистенциальные эффекты.

Что за а

@Bobmajor
Bobmajor / gist:319e89e9c876cccdb1b77f1783e9a820
Created April 25, 2020 16:06
HOW TO INSTALL POSTMAN ON LINUX WITHOUT SNAP
1. Go to the Postman app download page at https://www.getpostman.com/apps. You can choose the os version from the drop-down. x64 for 64 bit Operating System and x84 for the 32 bit based Linux
2. Open the terminal and go to the directory where you have downloaded the tar file. If you have downloaded on the Downloads folder
cd ~/Downloads/
3. Run the following commands,
sudo rm -rf /opt/Postman/
@darhonbek
darhonbek / resume-dark-mamataliev.md
Last active August 25, 2025 22:06
Resume - Dark Mamataliev

Darkhonbek Mamataliev

Senior iOS Engineer at TikTok · ex Uber

GitHub | LinkedIn | Email

Building pixel perfect apps for 1 billion people. Areas: social network, delivery, finance, logistics.

EXPERIENCE

**TikTok, October, 2023 – Present

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@Envek
Envek / rescue-from-git-push-force.md
Last active July 14, 2025 08:27
Откат ошибочной команды git push --force

Откат ошибочной команды git push --force

Иногда при работе с несколькими удалёнными репозиториями в git, может произойти страшное: git push --force в не тот remote и/или не в ту ветку.

Такое может случиться, например, если вы используете [Deis], в котором деплой запускается при git push нужного коммита в сборщик, когда при отладке деплоя после очередного git commit --amend по запарке вместо git push deis master --force делается просто git push --force. Упс.

Как результат, последние коммиты коллег безвозвратно потеряны, и вы чувствуете неотвратимость их ярости…

Но это git, а значит всё можно починить!

@addo47
addo47 / delay.java
Created April 17, 2017 14:32
Get delay from a certain time
Calendar calendar = Calendar.getInstance();
calendar.set(2017, Calendar.APRIL, 17, 6, 27, 0);
long desiredDelay = calendar.toInstant().getEpochSecond() - TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis());
Executors.newSingleThreadScheduledExecutor()
.schedule(() -> {/* your logic here */}, desiredDelay, TimeUnit.SECONDS);
@petervanderdoes
petervanderdoes / 1.JetBrains_Change_Location_Of_Config_And_System_Directories.md
Last active August 19, 2024 08:44
JetBrains change location of config and system directories

Intro

Normally the Jetbrains applications store their config and system in a directory in your home directory. That's fine except when you run out of space in your home directory, or they change the directory with an upgrade. For example, when you upgrade PhpStorm from 2016.3 to 2017.1, the config directory and systems directory changes as well. This means that 2017.1 doesn't have the plugins you installed with 2016.3

Somewhere buried deep in the knowledge base is an article that explains how you can fix this but putting it out here makes it easier to find.

Instructions

These instructions are written for Ubuntu, if you run another distro the locations and files might be different.

I'm assuming you config and system directory will be stored in /d1/config/{JetBrains App}/

@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active December 18, 2024 16:07
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)
@nepsilon
nepsilon / git-change-commit-messages.md
Last active November 19, 2024 18:18
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.