Skip to content

Instantly share code, notes, and snippets.

View PovilasKorop's full-sized avatar
💭
Explaining code in a human-friendly way.

PovilasKorop

💭
Explaining code in a human-friendly way.
View GitHub Profile
@PovilasKorop
PovilasKorop / settings.local.json
Created September 22, 2025 17:02
Claude Code Hook for Checking Git Status on Session Start
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "git rev-parse --git-dir > /dev/null 2>&1 && (! git diff-index --quiet HEAD -- && echo '⚠️ You have uncommitted changes in your git repository.' && echo '' && echo 'Changes:' && git status --porcelain || echo '✅ Git repository is clean')"
}
]
@PovilasKorop
PovilasKorop / index.php
Created February 14, 2022 06:24
PHP NumberFormatter Demo
<?php
function getFormattedNumber(
$value,
$locale = 'en_US',
$style = NumberFormatter::DECIMAL,
$precision = 2,
$groupingUsed = true,
$currencyCode = 'USD',
) {