Skip to content

Instantly share code, notes, and snippets.

View qoomon's full-sized avatar
🌳
Go for it.

Bengt Brodersen qoomon

🌳
Go for it.
View GitHub Profile
@qoomon
qoomon / jira-queries.md
Last active February 7, 2023 09:21
Jira Queries

Board Quick Filters

  • Recently Updated

    • updatedDate >= -1d OR ( updatedDate <= endOfWeek(-1w) AND updatedDate >= -3d)
      • Filter issues updated since last weekday
  • Flagged

    • Flagged is not EMPTY
  • Flter flagged issues

@qoomon
qoomon / clipperz2enpass.js
Created October 26, 2020 18:30
clipperz export to enpass converter
#!/usr/bin/env node
// requirenments
// npm install --save \node-html-parser uuid
const fs = require('fs')
const parseHtml = require('node-html-parser').parse
const uuid = require('uuid').v4
@qoomon
qoomon / git_configure.sh
Last active July 23, 2024 11:04
Opinionated Git Config
#!/bin/bash
# git global config see $HOME/.gitconfig
# ensures to convert CRLF to LF when writing to database
git config --global core.autocrlf 'input'
git config --global core.editor '$EDITOR'
git config --global core.pager 'less -R -M'
git config --global color.ui 'auto'
@qoomon
qoomon / aws-cloudformation-deployer.sh
Last active August 13, 2020 08:03
Deploy CloudFormation Templates including Packaging and Deploy Event Watching
#!/usr/bin/env bash
set -o errexit # exit when a command line fails
set -o pipefail # pipes exit code will be the last non-zero exit code of all pipe commands
set -o nounset # exit on read a undeclared variable
#set -o xtrace # enable debug logging
cd "$(dirname "${BASH_SOURCE[0]}")"
### SOURCE: https://gist.github.com/qoomon/7e6f751415389a8bd67f05dd0b984d06
### REQUIREMENTS #######################################################################################################
@qoomon
qoomon / iptables-local-port-forward.sh
Last active August 15, 2022 20:21
iptables - forward traffic from local port to target address
#!/usr/bin/env bash
set -o errexit # exit when a command line fails
set -o pipefail # pipes exit code will be the last non-zero exit code of all pipe commands
set -o nounset # exit on read a undeclared variable
#set -o xtrace # enable debug logging
cd "$(dirname "${BASH_SOURCE[0]}")"
# systemctl enable iptables.service
# Target Address e.g '123.123.123.123:1024'
@qoomon
qoomon / hibp
Last active October 5, 2024 15:39
Have I been pwned! Script to check your password against https://haveibeenpwned.com/
#!/usr/bin/env sh
set -e
color_red=$'\e[1;31m'
color_green=$'\e[1;32m'
color_reset=$'\e[0m'
########################### Usage ##############################################
#
# password prompt 'hibp'
# or
@qoomon
qoomon / Log4jCollector.kt
Last active September 13, 2019 13:50
Log4jCollector Junit5 Extension
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.core.Filter.Result
import org.apache.logging.log4j.core.LogEvent
import org.apache.logging.log4j.core.Logger
import org.apache.logging.log4j.core.filter.AbstractFilter
import org.junit.jupiter.api.extension.AfterAllCallback
import org.junit.jupiter.api.extension.BeforeAllCallback
import org.junit.jupiter.api.extension.BeforeEachCallback
import org.junit.jupiter.api.extension.ExtensionContext
@qoomon
qoomon / aws-cloudformation-deploy-watcher.sh
Last active May 26, 2020 06:24
Watch CloudFormation Events during `aws cloudformation deploy`
#!/usr/bin/env bash
set -o errexit # exit when a command line fails
set -o pipefail # pipes exit code will be the last non-zero exit code of all pipe commands
set -o nounset # exit on read a undeclared variable
#set -o xtrace # enable debug logging
#### Source: https://gist.github.com/qoomon/d6633abe35eea297f475260478f86c8c
### Usage ###
#
@qoomon
qoomon / ChromeRemoveAllDomainSearchEngins.js
Last active March 11, 2019 11:09
[Google Chrome] Remove all domain search engines #cleanup
// open chrome://settings/searchEngines and run following script in browser console
// will remove every 'other' search engine wich contains a '.' in its keyword
settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList()
.then(engines => engines.others.forEach(engine => {
if(engine.keyword.includes(".")){
console.log("remove: " + engine.displayName + " - " + engine.keyword)
settings.SearchEnginesBrowserProxyImpl.prototype.removeSearchEngine(engine.modelIndex);
}
}));
@qoomon
qoomon / escapeHTML.js
Created February 28, 2019 12:58
JS Function to escape HTML text
function escapeHTML(text) {
let element = document.createElement('_');
element.innerText = text;
return element.innerHTML;
}