Skip to content

Instantly share code, notes, and snippets.

View kolaente's full-sized avatar
:shipit:
The problem with git jokes is everyone has their own version.

kolaente

:shipit:
The problem with git jokes is everyone has their own version.
View GitHub Profile
@kolaente
kolaente / md
Created July 17, 2017 22:06
Test
Lorem Ipsum
@kolaente
kolaente / issue.go
Created November 1, 2017 20:18
Gitea Go checking for open dependencies
if noDeps, err := models.IssueNoDependenciesLeft(issue); err != nil {
return
}
if form.Status == "close" && !noDeps {
if issue.IsPull {
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
} else {
ctx.Flash.Error("You need to close all issues blocking this issue before you can close it!")
package main
import (
"gopkg.in/russross/blackfriday.v2"
"fmt"
)
func main() {
output := blackfriday.Run([]byte("blalabla ldsf test@local test@example.com https://example.com KÄsebRot"))
fmt.Println(string(output))

Allgemeines

Anrede: Wenig förmlich:

  • "Du"-Form
  • Keine gruseligen "Amtsdeusch"-Umschreibungen, einfach so als ob man den Nutzer direkt persönlich ansprechen würde

Genauer definiert:

  • "falsch" anstatt "nicht korrekt/inkorrekt"
  • Benutzerkonto oder Konto? Oder Account?
  • "Wende dich an ..." anstatt "kontaktiere ..."
@kolaente
kolaente / keybase.md
Created November 6, 2018 16:15
keybase.md

Keybase proof

I hereby claim:

  • I am kolaente on github.
  • I am kolaente (https://keybase.io/kolaente) on keybase.
  • I have a public key ASAtSCTy5GIiYXuYa7VSmbFGmfomoOBUKcFd3cBlWGAcwgo

To claim this, I am signing this object:

@kolaente
kolaente / main.go
Created November 8, 2018 22:17
sort
package main
func main() {
arr := [12,43,3,5,4,6,7,83,2,545,23,563,345,900]
arr2 := [2,3,4,5,6,7,12,23,43,83,345,545,563,900]
}
@kolaente
kolaente / kv-diagram.tex
Created November 24, 2018 15:25
latex stuff
\usepackage{tikz}
% KV-Diagram
\input kvmacros
\begin{document}
\karnaughmap{3}{}{{$S$}{$R$}{$Q^*$}}
{010011**}
{
@kolaente
kolaente / diffs.md
Created January 9, 2019 14:28
Create diffs between folders

Compare

Two folders, create a diff file:

diff -r folder1/ folder2/ -iEZbBuN > thediff.diff

The -N treats notexisting files as empty. That way, diff will continue to walk through directories even if a file is not found.

@kolaente
kolaente / magento-2-cheat-sheet.md
Last active April 2, 2023 06:49
Magento2 Cheat-sheet

Update Translations

Files in csv files. See here and here.

Knockout

Some translations are loaded over Knockout (Something like <span data-bind="i18n: 'Billing address'"></span>). These are retrieved from a js-translation.json which is generated based on the csv.

To generate it, run

@kolaente
kolaente / image_blue.json
Created November 11, 2019 09:34
Magento product images with same name bug
{"entry":{"media_type":"image","types":[],"disabled":false,"label":null,"content":{"type":"image\/jpeg","name":"product_image_new.jpg","base64EncodedData":"/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wgARCABkAGQDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAWAQEBAQAAAAAAAAAAAAAAAAAABgj/2gAMAwEAAhADEAAAAYnp2TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//xAAUEAEAAAAAAAAAAAAAAAAAAABw/9oACAEBAAEFAin/xAAUEQEAAAAAAAAAAAAAAAAAAABw/9oACAEDAQE/ASn/xAAUEQEAAAAAAAAAAAAAAAAAAABw/9oACAECAQE/ASn/xAAUEAEAAAAAAAAAAAAAAAAAAABw/9oACAEBAAY/Ain/xAAUEAEAAAAAAAAAAAAAAAAAAABw/9oACAEBAAE/ISn/2gAMAwEAAgADAAAAEEkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkl//xAAUEQEAAAAAAAAAAAAAAAAAAABw/9oACAEDAQE/ECn/xAAUEQEAAAAAAAAAAAAAAAAAAABw/9oACAECAQE/ECn/xAAUEAEAAAAAAAAAAAAA