Skip to content

Instantly share code, notes, and snippets.

View kereis's full-sized avatar
🍴
Fork it until you make it.

Kevin Reis kereis

🍴
Fork it until you make it.
  • Germany
  • 18:25 (UTC +02:00)
View GitHub Profile
@kereis
kereis / Fix-Synctex.ps1
Created May 12, 2021 12:35
Replace Unix paths in Synctex (Latex) file with Windows paths
<#
.SYNOPSIS
Replace Unix paths in Synctex (Latex) file with Windows paths
.DESCRIPTION
Replace Unix paths in Synctex (Latex) file with Windows paths.
This script un-gzips the Synctex.gz file, replaces Unix paths set by Docker image arara-docker
with a Windows path of choice. The paths are defined by parameters.
.PARAMETER SynctexFile
@kereis
kereis / CDMA.java
Created May 29, 2020 08:09
Simulates communication between receiver and sender using CDMA (Code Division Multiple Access)
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* <h1>CDMA</h1>
* <p>Simulates a spread spectrum communication</p>
* <p>
* Each {@link Receiver} listens to one chip sequence ({@link Stations}) and can be accept by the {@link Sender}.
* A {@link Sender} can send multiple chip sequences at once, added together to a matrix.
@kereis
kereis / backup.sh
Created April 17, 2020 13:47
Backup folder script
#!/bin/bash
DATE=`date +%y%m%d-%H%M`
WORKDIR=/srv/daemon-data/
BACKUPDIR=/srv/backups
echo
echo "> Starting backup"
backup() {
@kereis
kereis / hide-active-window.ahk
Created March 30, 2020 21:25
AutoHotkey Macro for hiding active windows in Windows.
; WINDOWS key (#) + H -> Hide active/foreground window
#H::WinMinimize, A
@kereis
kereis / wsl-ubuntu-setup.sh
Created March 28, 2020 12:16
Quick setup customization script for Windows Subsystem Linux
#!/bin/bash
# In Windows 10:
# powershell -command Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Switch to tmp dir as workdir