This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| # lock and hide Google Drive link | |
| chflags -h uchg,hidden "$HOME/Google Drive" | |
| # undo by following command | |
| # chflags -h nouchg,nohidden "$HOME/Google Drive" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| 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); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| 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". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| # list repos | |
| # gh repo list $owner --json nameWithOwner -q '.[].nameWithOwner' | |
| repos=( | |
| example/example | |
| ) | |
| for repo in "${repos[@]}" | |
| do | |
| echo $repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| 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() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| 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'}], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| // ------------------------------------------ | |
| // ---- Set default Description ------------- | |
| // ------------------------------------------ | |
| def defaultDescriptions = [ | |
| Story: """ | |
| *As a* USER | |
| *I want* FEATURE | |
| *so that* BENEFIT | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e # exit on error | |
| ################################################ | |
| # | |
| # Prerequisits: | |
| # ensure ImageMagick is installed | |
| # | |
| # Usage: | |
| # convert-pdf2scan [--gray] files... | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| // 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 |