Skip to content

Instantly share code, notes, and snippets.

@psu
psu / log-extract-akeneo.sh.md
Last active January 24, 2026 08:40
Miller - Extract information and attributes from an Akeneo PIM log file
#!/bin/zsh -
############################################################################
# Miller - Extract information and attributes from an Akeneo PIM log file #
# Pontus Sundén 2024 #
############################################################################
if [[ $# == 0 || $1 == "--help" || $1 == "-h" ]]; then
echo
echo ' Miller - Extract information and attributes from an Akeneo PIM log file'
@psu
psu / csv-translate-with-mapping.sh.md
Last active January 24, 2026 08:41
Miller - Translate values in CSV file with mapping ("old" to "new")
#! /bin/zsh -
########################################################################
# Miller - Translate values in CSV file with mapping ("old" to "new") #
# Pontus Sundén 2024 #
########################################################################
# get input from fancy command line flags
zmodload zsh/zutil
zparseopts -A ARGUMENTS -input: -map: -column:
@psu
psu / jq-qlerify-commands.sh.md
Last active January 24, 2026 08:42
JQ & Qlerify commands

###############################################

JQ & Qlerify commands -- Pontus Sundén 2024

###############################################

BASICS

List event descriptions

jq '.eventsJson[].description'

List events with type appended (if other than "Task)

@psu
psu / miller-commands.sh.md
Last active January 24, 2026 08:43
MILLER commands

#########################################

MILLER commands -- Pontus Sundén 2024

#########################################

Transpose two CSV rows to a tab-separated list

mlr --c2d --ops tab --ofs newline cat

Change each occurrence of value X

mlr --csv put '$* = apply(func(k,v){if(v=="X"){v="Y"};return {k:v}})'

@psu
psu / useful-shell.md
Last active January 24, 2026 08:56
Useful Shell Commands

Useful Shell Commands

ffmpeg

Convert .mkv to .mp4

ffmpeg -i "${input_file}" -vcodec copy -acodec copy "${output_file_name}".mp4
@psu
psu / jira-api-jq.md
Last active January 24, 2026 09:03
Jira API calls with JQ parsing

jira-cmd + JQ => Alfred App

Search Jira with jira-cmd (palashkulsh/jira-cmd) and re-structure the result into Alfred app Script Filter JSON

jira jql --json true "(summary ~ '$1' OR description ~ '$1') AND project IN (${projects})" | \
jq '.[] | {
  uid: .key, 
  title: "\(.key): \(.fields.summary)", 
 subtitle: "Component: \(.fields.components[0].name)", 
@psu
psu / logseq-config-default-queries.edn
Last active April 12, 2025 17:25
logseq-config-default-queries.edn
;; Logseq Default Query 6-pack
;; ---------------------------
;;
;; Pontus Sundén (@psu)
;; October 28, 2022
;;
;; Attribution
;; - https://gist.github.com/sawhney17/3a1b04936f35df80253431a61cb74737
;;
;; ---------------------------