Skip to content

Instantly share code, notes, and snippets.

@salmin89
salmin89 / on-all.sh
Created April 4, 2022 19:23
shell scripts to perform commands on multiple repos at once
#usage oa -p /proj1/ -p /proj2/ git checkout master
while getopts "p:" flag; do
case $flag in
p) paths+=("$OPTARG");;
*) echo "Unexpected option ${flag}"; exit 1;;
esac
done
shift $(expr $OPTIND - 1 )
@salmin89
salmin89 / script.js
Last active September 21, 2020 03:10
Copy to Trello format
var rows = window.getSelection().toString().split("\n");
var addDashes = true;
var instructionNr = 0;
var formattedText = rows.filter(row => row !== "").map(row => {
if (row.toLowerCase().includes("ingredient")) {
return '## ' + row + ' ##\n';
@salmin89
salmin89 / README.md
Last active April 22, 2020 18:20
Angular debugger

Descritpion:

An alternative to debug your Angular Component.

Installation

There are two ways of using this.

  1. Paste this code in the browser console
  2. Use a Javascript Compresser to minify it into a one-liner. Paste the code into the URL-part of a bookmark (javascript: code)

How to use

  • The first time you run the code, it'll ask you to enter the component name. Then it will save the component name in localStorage