Skip to content

Instantly share code, notes, and snippets.

View nikalas's full-sized avatar

nikalas

  • Sweden
  • 12:10 (UTC +02:00)
View GitHub Profile
// create number format
currencyFormat = new Intl.NumberFormat("sv-SE", {
style: "currency",
currency: "sek",
currencyDisplay: "symbol",
trailingZeroDisplay: "stripIfInteger",
});
// Switches input type to text when it has value to render (`.on("blur")`) as ex. "100 000,23 kr."
// but switches back to number on focus (`.on("focus")`) to use its inbuilt number
@nikalas
nikalas / quick-merge
Last active February 13, 2024 06:50
will merge current branch into release/dev and switch back to current branch
#!/usr/bin/env bash
# This script will merge the current branch into the provided branch or release/dev branch
# and then switch back to the current branch.
# Save as quick-merge in your path (ex. ~/bin/quick-merge) and make executable, then source it from `.bashrc` or `.zshrc`
# by adding the folder to your path `export PATH="$HOME/bin:$PATH"`
# The script can be used as a base with aliases for other branches eg. `alias mprod='quick-merge release/prod'`
set -e