Skip to content

Instantly share code, notes, and snippets.

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

Max Große maxRN

🏠
Working from home
  • TU Dresden
  • Dresden, Germany
View GitHub Profile
@maxRN
maxRN / PDF tips.md
Last active May 11, 2023 10:53
PDF Cheatsheet

How to remove password from PDF

  • Install qpdf
brew install qpdf
  • To replace contents of PDF run
@maxRN
maxRN / nvim-ssh.txt
Last active February 26, 2022 17:43
edit file on server via ssh with (n)vim
vim scp://user@myserver[:port]//path/to/file.txt
# also works when you set a custom name in ~/.ssh/config;
# e.g. edit a file on raspberry pi
nvim scp://pi/pythonScripts/timetable.py
@maxRN
maxRN / findIssueKeys.sh
Created March 22, 2022 21:13
Get Jira issues for file from commit history
#!/bin/bash
JIRA_BASE_URL="https:\/\/your.jira.com\/browse\/"
# --follow lists all commits for the particular file, even through renames
# %B is short for commit subject line + body
COMMIT_MESSAGES=$(git log --pretty=format:%B --follow -- $1)
# matches Jira issue keys, e.g. JIRA-123
PATTERN='([[:upper:]]+-[[:digit:]]+)'
@maxRN
maxRN / gitLogSearch.sh
Last active March 23, 2022 14:08
Search through git log history by regex pattern
#!/bin/bash
git log --extended-regexp --grep="JIRA-[[:digit:]]+" --pretty="format:%h %ar %n >>%s<< %n"
# %h = commit ID short
# %ar = date
# %s = subject line
# %n = newline
@maxRN
maxRN / fix_author.md
Last active December 8, 2022 17:01
Fix author of multiple commits