Skip to content

Instantly share code, notes, and snippets.

View belgoros's full-sized avatar
🏠
Working from home

Serguei Cambour belgoros

🏠
Working from home
View GitHub Profile
@belgoros
belgoros / update-deps.md
Created January 29, 2026 16:25 — forked from ChristianAlexander/update-deps.md
Update Elixir Dependencies Skill

Update Elixir Dependencies

Update all outdated dependencies in this Elixir project, handling both safe updates and breaking changes.

Workflow

1. Identify Outdated Dependencies

Run mix hex.outdated to get a list of all outdated dependencies. Parse the output to identify:

  • Safe updates: Dependencies where only the patch or minor version has changed (no major version bump)
@belgoros
belgoros / prd.md
Created April 18, 2025 10:05 — forked from burkeholland/prd.md
TheUrlist PRD

Project Requirements Document: The Urlist Website

The following table outlines the detailed functional requirements of The Urlist website.

Requirement ID Description User Story Expected Behavior/Outcome
FR001 Creating a New URL List As a user, I want to be able to start a new, empty list so I can begin adding URLs. The system should provide a clear way for the user to initiate the creation of a new list, potentially presenting an empty list view or an "add new list" button.
FR002 A
@belgoros
belgoros / OCRExample.java
Last active May 26, 2025 10:42
Tesseract usage example in Java for text recognition in an image file
package com.sca.tesseract;
import net.sourceforge.tess4j.ITesseract;
import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;
import java.io.File;
/**
* This is an example of using Tess4J library, a JNA wrapper for <a href="https://github.com/tesseract-ocr/tesseract/tree/main">Tesseract</a>.
@belgoros
belgoros / application_context_load_error.txt
Last active August 17, 2023 08:48
Spring Boot: fails to to load ApplicationContext when running a test
10:28:00.693 [main] DEBUG org.springframework.test.context.junit4.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class com.altran.plage.rest.SubsidiaryControllerTest]
10:28:00.700 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
10:28:00.705 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
10:28:00.719 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [com.altran.plage.rest.SubsidiaryControllerTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper]
10:28:00.726 [main] INFO org.springframework.boot.test.context.SpringBoo
@belgoros
belgoros / wgc.ex
Created April 19, 2023 19:50 — forked from am-kantox/wgc.ex
Wolf + Goat + Cabbage
defmodule WolfGoatCabbage.State do
defstruct banks: %{true => [], false => []}, ltr: true, history: []
end
defmodule WolfGoatCabbage.Subj do
defstruct me: nil, incompatible: []
end
defmodule WolfGoatCabbage do
alias WolfGoatCabbage.{State, Subj}
@belgoros
belgoros / testJsonArrayValues.java
Created April 17, 2023 14:38
Ignore specific node values when using `JSONAssert.assertEquals`
@Test
public void testJsonArrayValues() throws JSONException {
String expectedJson = """
{
"messageElements": {
"messageStatus": "SUCCESS",
"businessCorrelationId": "a80337639eb40758",
"errorList": []
},
"data": [
@belgoros
belgoros / phoenix - setup_tailwind.md
Created October 10, 2022 13:10
Set up Tailwind in a Phoenix application

Set up Tailwind CSS in a Phoenix application

  • add tailwind dependency to the mix.exs file: {:tailwind, "~> 0.16", runtime: Mix.env() == :dev}
  • Configure tailwind in config.exs, where it will read, and where it will output the data:
config :tailwind, version: "3.1.4", default: [
  args: ~w(
    --config=tailwind.config.js
@belgoros
belgoros / tm_properties
Created July 29, 2022 09:52 — forked from tedw/tm_properties
TextMate 2 Settings
spellChecking = true
spellingLanguage = 'en'
softTabs = true
softWrap = false
invisiblesMap = "~ \t┊"
TM_STRIP_WHITESPACE_ON_SAVE = true
TM_GIT = "/usr/local/bin/git"
TM_RUBY = "/usr/local/var/rbenv/shims/ruby"
@belgoros
belgoros / palindrome_products.rb
Last active July 28, 2022 06:01
Exercisme: palindromes exercise
class Palindromes
private
attr_reader :factors, :max_factor, :min_factor, :palindromes
def initialize(min_factor: 1, max_factor: 1)
@min_factor = min_factor
@max_factor = max_factor
@factors = (min_factor..max_factor).to_a
@palindromes = palindromes
@belgoros
belgoros / TestDouble.java
Created June 4, 2021 14:48 — forked from hillmanli-seekers/TestDouble.java
BigDecimal vs double: illustration of accuracy and performance impact
import java.math.BigDecimal;
import java.util.function.Consumer;
import java.util.function.DoubleSupplier;
import java.util.stream.DoubleStream;
public class TestDouble {
private static double doubleTotal = 0;
private static double kahanDoubleTotal = 0;