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 / 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 / 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 / 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;
@belgoros
belgoros / stored_procedure_service.rb
Created May 8, 2021 15:53 — forked from ys/stored_procedure_service.rb
Execute stored procedure
class StoredProcedureService
def self.instance
@instance ||= StoredProcedureService.new
end
def execute(name, *args)
results = []
begin
connection.execute("CALL #{name}(#{args.join(',')})").each(as: :hash, symbolize_keys: true) do |row|
@belgoros
belgoros / gist:6a8b233ea70abd449202aa3baecbdffa
Created July 31, 2020 07:46 — forked from leftclickben/gist:322b7a3042cbe97ed2af
Steps to migrate from SVN to GitLab

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
@belgoros
belgoros / Guardian JWT.md
Created October 24, 2019 14:04 — forked from nikneroz/Guardian JWT.md
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.

Elixir + Phoenix Framework + Guardian + JWT + Comeonin

Preparing environment

We need to generate secret key for development environment.

mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf

Let's generate User model and controller.

@belgoros
belgoros / regexCheatsheet.js
Created January 15, 2019 08:35 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@belgoros
belgoros / components.a-teeny-component.js
Created October 26, 2018 15:09 — forked from jenweber/components.a-teeny-component.js
Example of passing actions from controller to nested component
import Ember from 'ember';
export default Ember.Component.extend({
});