Skip to content

Instantly share code, notes, and snippets.

View justjanne's full-sized avatar

Janne Mareike Koschinski justjanne

View GitHub Profile
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
conflicts=$(git status --porcelain | grep UU | cut -d ' ' -f 2)
for conflict in $conflicts; do
cat $conflict | \
tr '\n' '\r' | \
sed -E 's/<<<<<<< [^\r]*\r((import[^\r]*\r)*)=======\r((import[^\r]*\r)*)>>>>>>> [^\r]*\r/\1\2\3\4/g' | \
tr '\r' '\n' | \
tee $conflict > /dev/null
@justjanne
justjanne / 01_Original.md
Last active April 7, 2022 20:56
Vergleich von Rechtschreibprüfungsprogrammen

Originaler Fehlertext

Schreiben sie in diesem Textfeld oder fügen Sie einen Text ein. Rechtshcreibfehler werden rot markirt, Grammatikfehler werden gelb hervor gehoben und Stilfehler werden, anders wie die anderen Fehler, blau unterstrichen. wussten Sie dass Synonyme per Doppelklick auf ein Wort aufgerufen werden können? Nutzen Sie Rechtschraibprüfungen in allen Lebenslagen, zB. wenn Sie am Donnerstag, dem 13. Mai 2022, einen Basketballkorb in 10 Fuß Höhe montieren möchten.


// ==UserScript==
// @name Highlight Comments: Hacker News
// @namespace de.kuschku.highlight-comments.hn
// @version 1.0.4
// @include https://news.ycombinator.com/item*
// @include https://news.ycombinator.com/reply*
// ==/UserScript==
function contentScript() {
const LOCAL_STORAGE_KEY = "highlight-comments";

this is
a line break

but this is a new paragraph

#!/bin/bash
declare -A tags
clear_message() {
start=0
source=""
fragment=""
tags=()
#!/bin/bash
declare -A fileinfo
# Resets the fileinfo map
fileinfo_reset() {
fileinfo[year]="0000"
fileinfo[month]="00"
fileinfo[day]="00"
fileinfo[hour]="00"
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "Prometheus",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"limit": 100,
@justjanne
justjanne / strings.xml
Created March 24, 2018 23:37
QuasselDroid German Translation
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">QuasselDroid</string>
<string name="connection_service_title">Verbindungsdienst</string>
<string name="connection_service_description">Hält eine Verbindung zum Core, um Benachrichtigungen und die Übertragung von Nachrichten zu ermöglichen</string>
<string name="label_buffer_name">Chatname</string>
<string name="label_cancel">Abbrechen</string>
<string name="label_close">Schließen</string>
import java.io.FileDescriptor;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
public class Jes {