Skip to content

Instantly share code, notes, and snippets.

View jonasbn's full-sized avatar
🐙
conducting sub-optimal multitasking

Jonas Brømsø jonasbn

🐙
conducting sub-optimal multitasking
View GitHub Profile
@jonasbn
jonasbn / gitignore.pl
Created September 4, 2024 19:42
Simple helper script in my path to add files to .gitignore, creating it if it does not already exist
#!/usr/bin/env perl
use warnings;
use strict;
my $file = '.gitignore';
if (-e $file and -f _ and -w _) {
open my $FOUT, '>>', $file or die "Unable to open file: $file - $!";
print $FOUT "$ARGV[0]\n";
@jonasbn
jonasbn / git-delete-tag.sh
Created September 4, 2024 19:35
Basic script in my path to delete tags, because I always forget the command structure
#!/bin/bash
# REF: https://jonasbn.github.io/til/git/delete_local_and_remote_branch.html
echo "Deleting tag $1 locally"
git tag -d $1
echo "Deleting tag $1 remotely"
@jonasbn
jonasbn / git-delete-branch.sh
Created September 4, 2024 19:33
Basic script in my path to delete Git branches locally and remotely, since I always forgot the command structures
#!/bin/zsh
# REF: https://jonasbn.github.io/til/git/delete_local_and_remote_branch.html
echo "Deleting branch $1 locally"
git branch -d $1
echo "Deleting branch $1 remotely"
@jonasbn
jonasbn / sort_semantic_version_numbers.pl
Last active September 5, 2024 08:44
Basic Perl script to sort semantic version numbers outputted from git tag command
#!perl
use warnings;
use strict;
use Data::Dumper;
use Getopt::Long;
my $reverse;
GetOptions ('reverse' => \$reverse) # flag
@jonasbn
jonasbn / .markdownlintignore
Created June 14, 2021 05:28
Configuration to ignore certain Markdownfiles from Markdownlint (.markdownlintignore)
CODE_OF_CONDUCT.md
@jonasbn
jonasbn / dependabot.yml
Created June 1, 2021 19:22
Basic dependabot configuration (dependabot.yml)
# Basic dependabot.yml file
# REF: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-actions-up-to-date-with-dependabot
version: 2
updates:
# Enable version updates for Docker
- package-ecosystem: "docker"
# Look for a `Dockerfile` in the `root` directory
directory: "/"
# Check for updates once a week
@jonasbn
jonasbn / .editorconfig
Created June 1, 2021 16:00
Basic EditorConfig configuration for repository (.editorconfig)
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
@jonasbn
jonasbn / .yakignore
Last active June 1, 2021 15:57
Canonical Yak ignore file (.yakignore)
.git
@jonasbn
jonasbn / .yaksums.json
Last active May 25, 2021 19:24
Canonical Yak checksum file (.yaksums.json)
{
".editorconfig": true,
".markdownlint.json": true,
".spellcheck.yml": true,
".wordlist.txt": true,
".yakignore": true,
".yaksums.json": true,
"auto_assign.yml": true,
"CHANGELOG.md": true,
"CODE_OF_CONDUCT.md": "https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md",
@jonasbn
jonasbn / PULL_REQUEST_TEMPLATE.md
Last active June 1, 2021 16:10
My generic public pull request template

Description

Please include a summary of the proposed improvement or addressed issue.

Please describe your proposed improvement in English, this makes it consumable by others than the author.

If applicable you can provide a keyword to close/fix/resolve a related issue.

GitHub Documentation