Skip to content

Instantly share code, notes, and snippets.

Avatar
🌳
Go for it.

Bengt Brodersen qoomon

🌳
Go for it.
View GitHub Profile
@qoomon
qoomon / qoomon.md
Last active April 19, 2023 08:51
qoomon styles
View qoomon.md

"Combining Long Stroke Overlay" (U+0336) and "Combining Short Stroke Overlay" (U+0335).

qoomon

q̴͈̮o̴̱ọm̶͓̥on͒

Q̶̸O̶̴O̶̴M̶̸O̶̴N̶̸


@qoomon
qoomon / bypass safe links.user.js
Last active March 22, 2023 14:45
Userscript to bypass Safe Links
View bypass safe links.user.js
@qoomon
qoomon / Colima-status.2s.zsh
Created February 13, 2023 16:44
xBar - Colima Status
View Colima-status.2s.zsh
#!/bin/zsh
# <xbar.title>Colima Status</xbar.title>
# <xbar.author>Bengt Brodersen</xbar.author>
# <xbar.author.github>qoomon</xbar.author.github>
# <xbar.desc>Displays Colima Status - https://github.com/abiosoft/colima</xbar.desc>
source ~/.zprofile
DOCKER_RUNNING_ICON='iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAACQAAAAAQAAAJAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAACqgAwAEAAAAAQAAACoAAAAAxiJEngAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0Y
@qoomon
qoomon / template.plugin.zsh
Created February 7, 2023 08:25
ZSH Plugin File Template
View template.plugin.zsh
#!/bin/zsh
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
echo "${${0:A}/%.plugin.zsh/.zsh}"
@qoomon
qoomon / script.sh
Last active February 9, 2023 16:13
Google Drive - Hide Symbolic Link in Home Directory
View script.sh
# lock and hide Google Drive link
chflags -h uchg,hidden "$HOME/Google Drive"
# undo by following command
# chflags -h nouchg,nohidden "$HOME/Google Drive"
@qoomon
qoomon / parse-body.js
Created October 25, 2022 14:38
Parse http.IncomingMessage body
View parse-body.js
async function parseBody(res) {
return new Promise((resolve, reject) => {
let body = '';
res.on('data', (chunk) => body += chunk);
res.on('end', () => resolve(body));
}).then(body => res.body = body ? JSON.parse(body) : undefined);
}
@qoomon
qoomon / base-vpc.ts
Created September 30, 2022 14:32
AWS CDK - Vpn Construct - Configure default security group according to "CIS AWS Foundations Benchmark controls",
View base-vpc.ts
import {Stack} from "aws-cdk-lib";
import {Vpc, VpcProps} from "aws-cdk-lib/aws-ec2";
import {AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId} from "aws-cdk-lib/custom-resources";
import {Construct} from "constructs";
export class BaseVpc extends Vpc {
constructor(scope: Construct, id: string, props: VpcProps) {
super(scope, id, props);
// Configure default security group according to "CIS AWS Foundations Benchmark controls",
// section "4.3 – Ensure the default security group of every VPC restricts all traffic".
@qoomon
qoomon / GitHubBulkOperations.sh
Created July 29, 2022 11:11
GitHub Bulk Operations
View GitHubBulkOperations.sh
# list repos
# gh repo list $owner --json nameWithOwner -q '.[].nameWithOwner'
repos=(
example/example
)
for repo in "${repos[@]}"
do
echo $repo
@qoomon
qoomon / ticktok_clean_favourites.js
Created April 29, 2022 07:42
Clean TikTok favourites
View ticktok_clean_favourites.js
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
View ATOSS Bulk Insert Bookmarklet.js
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'}],