Skip to content

Instantly share code, notes, and snippets.

View stefanDeveloper's full-sized avatar

Stefan M. stefanDeveloper

View GitHub Profile
@stefanDeveloper
stefanDeveloper / shell.nix
Created March 21, 2023 09:27
Jupyter Notebook Nix Shell
with import <nixpkgs> { };
pkgs.mkShell rec {
venvDir = "./.venv";
buildInputs = [
# Defines a python + set of packages.
(python3.withPackages (ps: with python3Packages; [
jupyter
ipython
ipykernel
@stefanDeveloper
stefanDeveloper / shell.nix
Last active January 9, 2023 09:49
NFStream Nix-Shell
with import <nixpkgs> { };
let
pythonPackages = python39Packages;
in pkgs.mkShell rec {
venvDir = "./.venv";
name = "nfstream";
requirements = "requirements.txt";
buildInputs = [
# Python
docker run -d --name pihole -e ServerIP=XXXXXX -e TZ=Europe/Berlin -e WEBPASSWORD=XXXXXX -e DNS1=1.1.1.1 -e DNS2=1.0.0.1 -p 80:80 -p 53:53/tcp -p 53:53/udp -p 443:443 -v ~/pihole/:/etc/pihole/ --dns=127.0.0.1 --dns=1.1.1.1 --cap-add=NET_ADMIN --restart=unless-stopped pihole/pihole:latest
@stefanDeveloper
stefanDeveloper / git_change_email.sh
Created November 26, 2020 21:07
Git change all commits
git filter-branch -f --env-filter \
"GIT_AUTHOR_NAME='NAME'; GIT_AUTHOR_EMAIL='E-MAIL'; \
GIT_COMMITTER_NAME='NAME'; GIT_COMMITTER_EMAIL='E-MAIL';" HEAD
@stefanDeveloper
stefanDeveloper / git_change_email.sh
Created November 26, 2020 21:05
Git change e-mail of author and committer
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "OLD E-MAIL" ]
@stefanDeveloper
stefanDeveloper / biber_bibliography.bat
Created January 23, 2018 16:19
Create biber bibliography
@echo off
ECHO Enter Tex name:
SET /p input=""
GOTO check
:check
IF "%input%" == "" (
ECHO Input is empty
GOTO exit
@stefanDeveloper
stefanDeveloper / autocommit.bat
Last active January 23, 2018 16:20
Batch script for git auto commit
@echo off
ECHO Enter commit statement:
SET /p input=""
GOTO check
:check
IF "%input%" == "" (
ECHO Input is empty
GOTO exit