Skip to content

Instantly share code, notes, and snippets.

View thraizz's full-sized avatar

A. Schueler thraizz

View GitHub Profile
@thraizz
thraizz / Caesarchiffre.java
Last active January 19, 2018 08:16
Programmier Praktikum 1 - zweite Abgabe
import java.io.*;
public class Caesarchiffre {
public static void main(String[] args)throws IOException{
boolean b1 = false;
int schluessel;
String eingabe;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Bitte einen Schlüsselwert zwischen 1-25 eingeben.");
do{
@thraizz
thraizz / determinantenProgramm.java
Last active January 8, 2018 16:04
DeterminatenProgramm
public class determinantenProgramm{
public int[][] matrix;
static String toString(int [][] matrix) {
String result = "";
for(int i = 0 ; i < (matrix.length*matrix.length) ; i++){
int j = i % matrix.length;
int k = i / matrix.length;
if (j == 0) {
@thraizz
thraizz / symetrischeVerschluesselung.java
Created January 8, 2018 15:52
Symetrische Verschluesselung
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class symetrischeVerschlüsselung {
public static void main(String[] args)throws IOException{
String[] ergebnis_array = new String[12];
String eingabe, schluessel;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
@thraizz
thraizz / mutechrome.cmd
Created February 28, 2018 08:46
Mute chrome with nircmd
for /f "skip=2" %%A in ('wmic process where "caption='chrome.exe'" get parentprocessid') DO nircmd.exe muteappvolume /%%A 2&goto next
:next
#!/bin/bash
DIST=CentOS_7
RELEASE=experimental/nightly/
URL=http://download.bareos.org/bareos/$RELEASE/$DIST
wget -O /etc/yum.repos.d/bareos.repo $URL/bareos.repo
yum -y install bareos bareos-database-postgresql bareos-webui bareos-storage-droplet postgresq-server
su postgres -c /usr/lib/bareos/scripts/create_bareos_database
su postgres -c /usr/lib/bareos/scripts/make_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
@thraizz
thraizz / .zshrc
Last active April 2, 2020 10:29
Oh-my-zshrc
if [ -f "$HOME/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
export ZSH="$HOME/.oh-my-zsh"
export PATH=/usr/bin:/bin:/usr/local/bin:${PATH}
#source $ZSH/.zsh_themes
ZSH_THEME="refined"
@thraizz
thraizz / docker-compose.yml
Last active February 21, 2021 14:21
NGINX Reverse Proxy + Docker: Host it yourself
version: '3'
services:
nginx:
image: nginx:latest
container_name: production_nginx
volumes:
- /etc/letsencrypt/:/etc/letsencrypt/
- ./nginx.conf:/etc/nginx/nginx.conf
- ./nginx/:/etc/nginx/
- ./nginx/cache/:/etc/nginx/cache
@thraizz
thraizz / docker-compose.yml
Created September 1, 2020 09:11
Minimal docker-compose.yml for starting NGINX as a proxy for a wordpress blog.
services:
nginx:
image: nginx:latest
container_name: production_nginx
volumes:
- /etc/letsencrypt/:/etc/letsencrypt/
- ./nginx.conf:/etc/nginx/nginx.conf
- ./nginx/:/etc/nginx/
ports:
- 80:80
@thraizz
thraizz / nginx.conf
Last active April 20, 2021 09:31
Minimal nginx.conf for reverse proxy usage
events {
}
http {
error_log /etc/nginx/error_log.log debug;
client_max_body_size 20m;
proxy_cache_path /etc/nginx/cache keys_zone=one:500m max_size=1000m;
server {
listen 80 default_server;
listen [::]:80 default_server;
@thraizz
thraizz / vimrc.vim
Created October 9, 2020 09:33
Awesome Vim: My vim documented configuration
set nocompatible " be iMproved, required
set noshowmode
set shell=/bin/zsh
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required