Skip to content

Instantly share code, notes, and snippets.

@MrSnyder
MrSnyder / exercise_linux_permissions
Last active February 1, 2023 10:54
Linux permissions exercise
# Linux permissions exercise
## Step 0: Create an example directory hierarchy
```
/srv
└── telekom
├── bin
├── gigabit
│   ├── bin
@MrSnyder
MrSnyder / cheatsheet_architecture.md
Last active October 30, 2020 16:41
Architecture Cheatsheet
@MrSnyder
MrSnyder / cheatsheet_regex.md
Last active October 23, 2020 08:39
Regex Cheatsheet

Regex Cheatsheet

sed

# base structure
sed 's/FIND_STRING/REPLACE_STRING/OPTIONS'
# examples
sed 's/<proxyBaseUrl>.*<\/proxyBaseUrl>/<proxyBaseUrl>https:\/\/whatever.de<\/proxyBaseUrl>/'

Options

@MrSnyder
MrSnyder / fossgis_tools.md
Last active October 29, 2020 11:12
FOSSGIS Tools

FOSSGIS Tools Cheatsheet

Imposm Cheatsheet

imposm  import -config imposm_config/config.json -read imposm_data/detmold-regbez-latest.osm.pbf -write -overwritecache -deployproduction

GeoServer

@MrSnyder
MrSnyder / python_cheatsheet.md
Last active October 30, 2020 16:25
Python Cheatsheet

Python Cheatsheet

Language

# list comprehension
names = ['Apple', 'Banana', 'wtf']
names_length = [len(v) for v in a]
name_to_length = {v:len(v) for v in a if len(v) < 4}

Dependency management

@MrSnyder
MrSnyder / sql_cheatsheet.md
Last active June 4, 2020 05:39
SQL Cheatsheet

SQL Cheatsheet

MySQL

-- start via docker
docker run --name=mystuff-mysql -d -e MYSQL_ROOT_PASSWORD=trallalla -e MYSQL_DATABASE=my_stuff -e MYSQL_USER=my_stuff -e MYSQL_PASSWORD=my_stuff -p 3306:3306 mysql:8

-- create database + user
CREATE DATABASE IF NOT EXISTS my_stuff;
FROM openjdk:8-jdk-alpine
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
@MrSnyder
MrSnyder / my_stuff_backend_challenge_2.md
Last active May 25, 2020 10:44
MyStuff Backend Challenge 2
@MrSnyder
MrSnyder / cheatsheet_spring_boot_testing.md
Last active August 7, 2020 14:15
Spring Boot Testing Cheatsheet
@MrSnyder
MrSnyder / cheatsheet_restful.md
Last active March 28, 2021 18:11
RESTful Cheatsheet

RESTful Cheatsheet

DISCLAIMER: This document is mostly not about pure REST (or "RESTful") APIs in the original sense intended by Roy Fielding. To my knowledge, most APIs found in the wild do not really qualify to be called RESTful, as they only use a subset of the ideas described by Roy Fielding.

Commonly found RESTful concepts

The following concepts are usually found in real-world web APIs that are described as RESTful:

  • Resource-orientation: A single base URI per resource type, e.g. /notes
  • Usage of HTTP verbs for CRUD operations (see table below)