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 / ticktok_clean_favourites.js
Created April 29, 2022 07:42
Clean TikTok favourites
async function sleep (timeout) {
return new Promise(res => setTimeout(res, timeout))
}
let videoElement = document.querySelector('div[data-e2e="user-liked-item"]').parentElement
while(videoElement) {
console.log(videoElement)
videoElement.scrollIntoView()
await sleep()
@qoomon
qoomon / ATOSS Bulk Insert Bookmarklet.js
Last active June 1, 2022 10:05
ATTOS Time Insert Bookmarklet
javascript:(async function() {
console.info('author: bengt brodersen - www.qoomon.de');
console.info('version: 1.0.1');
'// this bookmarklet will insert configured workingTimes for all visible empty days in the past';
'// === configuration ====================================================';
const workingTimes = {
'Mo': [{checkIn: '08:00', checkOut: '16:30'}],
'Di': [{checkIn: '08:00', checkOut: '16:30'}],
@qoomon
qoomon / ecs-execute-command.sh
Last active February 1, 2022 07:50
Connect into AWS ECS Container
CLUSTER_NAME=$1
SERVICE_NAME=$2
CONTAINER_NAME=$3
COMMAND=${4:-'/bin/sh'}
# get first running task
TASK_ID=$(aws ecs list-tasks \
--cluster $CLUSTER_NAME \
--service-name $SERVICE_NAME \
--desired-status RUNNING \
@qoomon
qoomon / jira_script runner_behaviour.groovy
Last active January 23, 2024 09:30
Jira Script Runner - Behaviour - Issue Templates, Restrict Links Types
// ------------------------------------------
// ---- Set default Description -------------
// ------------------------------------------
def defaultDescriptions = [
Story: """
*As a* USER
*I want* FEATURE
*so that* BENEFIT
@qoomon
qoomon / convert-pdf2scan.sh
Last active January 21, 2022 14:51
fake pdf scanner.
#!/usr/bin/env bash
set -e # exit on error
################################################
#
# Prerequisits:
# ensure ImageMagick is installed
#
# Usage:
# convert-pdf2scan [--gray] files...
#
@qoomon
qoomon / youtube_clean_watch_later_videos.js
Last active April 15, 2024 07:25
Clean YouTube Watch Later Videos
// Version 2.0.1
// This script will remove all videos from watch later list
//
// Usage
//
// #1 go to https://www.youtube.com/playlist?list=WL
// #2 run following script in your browser console
(async function() {
const playlistName = document.querySelector('.metadata-wrapper #container #text')?.textContent || document.querySelector('#text')?.textContent
@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 March 27, 2024 09:51
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 #######################################################################################################