Skip to content

Instantly share code, notes, and snippets.

View corusm's full-sized avatar
:octocat:
computerei

Niklas Leinz corusm

:octocat:
computerei
View GitHub Profile
@corusm
corusm / Viginere.java
Last active November 21, 2018 23:28
Method for Encryption and Decryption with the Viginere Cipher
public class vigi {
public static String vigenere(String text, String key, int mode) {
text = text.toUpperCase();
text = text.replaceAll(" ", "");
key = key.toUpperCase();
String returnText = "";
for (int i = 0, j = 0; i < text.length(); i++, j++) {
//i: Zähler für text; j: Zähler für key
if (j == key.length()) {
j = 0;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
System.out.println("Text eingeben...");
String text = keyboard.nextLine().toLowerCase();
char[] chartext = text.toCharArray();
char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toCharArray();
String klartext = jTextField1.getText();
int vers = jNumberField1.getInt();
int[] va = new int[klartext.length()];
if (vers>25) {
vers= vers-25;
} // end of if
for (int i=0;i<va.length;i++) {
va[i] = klartext.charAt(i);
}
@corusm
corusm / index.js
Created December 25, 2018 22:49
Telegram bot for sending videos
const Telegraf = require('telegraf');
const fs = require('fs');
const ytdl = require('ytdl-core');
// DOC
// add bot token in "config.json"
// {
// "token": "placeTokenHere"
// }
// npm install ytdl-core --save
@corusm
corusm / index.js
Created December 25, 2018 22:49
Telegram bot for sending videos
const Telegraf = require('telegraf');
const fs = require('fs');
const ytdl = require('ytdl-core');
// DOC
// add bot token in "config.json"
// {
// "token": "placeTokenHere"
// }
// npm install ytdl-core --save

Self-Host Sharelatex Server

Create user

User erstellen mit Homeverzeichnis useradd -m test

Install Docker

Arch Linux (yay)

yay -S docker

@corusm
corusm / keybase.md
Last active November 26, 2020 19:35

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

version: '3.7' # 2.2
networks:
main:
external: true
services:
proxy:
image: "traefik:v2.2"
container_name: reverse-proxy
restart: always
command:
@corusm
corusm / docker-compose.yml
Last active December 3, 2020 23:21
Docker Compose for Encrypted Sharelatex Container
version: '3.7'
networks:
main:
external: true
services:
proxy:
image: "traefik:v2.2"
container_name: reverse-proxy
restart: always
command:
@corusm
corusm / docker-compose.yml
Created December 2, 2020 22:49
Traefik Docker Compose Beginner Guide
version: '3.7'
networks:
main:
external: true
services:
proxy:
image: "traefik:v2.2"
container_name: reverse-proxy
restart: always
command: