This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
max=1000 | |
cmd="sha256sum -" | |
blob="dsahgjkasgktaskgk" | |
endCmd="" | |
for (( i=1; i<=$max; i++ )) | |
do | |
endCmd=${endCmd}"echo ${blob}$i | $cmd;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/gnuplot | |
# small sample script to be extended for any project | |
set terminal wxt size 350,262 enhanced font 'Verdana,10' persist | |
# Line width of the axes | |
set border linewidth 1.5 | |
# Line styles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/gnuplot | |
set terminal wxt size 350,262 enhanced font 'Verdana,10' persist | |
# set terminal dumb | |
file="`echo $plot_file`" # make sure to set the $plot_file environment variable first | |
f(x) = a*x+b | |
a = 1 | |
b = 1 | |
fit f(x) file via a,b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# | |
# small script to send spam mails using mutt (excercise project for a course) | |
# @author: Lars Groeber | |
# | |
# Usage: | |
# SCRIPTNAME [-T %Y%m%d%H%M] [-t timeInterval-in-min] [-m maxMails] | |
# (-s subject,email,body) | (-f subject,file-with-emails,body) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script watches the local folder for files with the ending in 'file_endings' | |
# and uploads them to a server specified in 'server'. | |
# | |
server_name="" # include login name if necessary | |
target_directory="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp1.1</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<Folder Include="wwwroot\" /> | |
</ItemGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" /> | |
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* \author Lars Gröber | |
*/ | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <unordered_map> | |
#include <thread> | |
#include <map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-test</artifactId> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.junit.jupiter</groupId> | |
<artifactId>junit-jupiter-engine</artifactId> | |
<version>5.1.0</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/email") | |
public class EmailApiController { | |
private final EmailService emailService; | |
public EmailApiController(EmailService emailService) { | |
this.emailService = emailService; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PreAuthorize("@authorizationService.hasPermission('SEND_MAIL', authentication)") | |
@Override | |
public void sendMail(SendMailRequest request) { | |
MimeMessage message = makeMessage(request); | |
addEmailLog(request); | |
sendMessage(message); | |
} |
OlderNewer