Skip to content

Instantly share code, notes, and snippets.

View Torstein-Eide's full-sized avatar

Torstein Eide Torstein-Eide

View GitHub Profile
@Torstein-Eide
Torstein-Eide / apache2_pihole.md
Created May 24, 2024 18:54 — forked from GAS85/apache2_pihole.md
Apache2 config for pihole with custom / non-admin link
@Torstein-Eide
Torstein-Eide / arch_linux_installation.md
Created January 23, 2024 09:33 — forked from orhun/arch_linux_installation.md
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
@Torstein-Eide
Torstein-Eide / To_trubleshoot.sh
Last active November 26, 2022 21:55
Getting OSPF to work with Pfsense FRR, linux quagga, wireguard
tcpdump -i tun_wg0 -n "ip[9] == 89" -vv
#!/bin/bash
set -ex
declare -a DISTS=("precise" "trusty")
ARCHS="amd64"
function register-mirror {
UBUNTU_URI='http://jp.archive.ubuntu.com/ubuntu/'
ROS_URI='http://packages.ros.org/ros/ubuntu'

how to manange media files

Install

sudo apt install libimage-exiftool-perl 

Batch metadata editing:

Replace the file name with a directory name to modify all files in a directory. Use a dot . for the current directory.

@Torstein-Eide
Torstein-Eide / debmirror.sh
Created July 10, 2021 10:45 — forked from kleinig/debmirror.sh
debmirror script
#!/bin/sh
DEBMLOG=/pool/debmirror/debmirror.log
MIRRORDIR=/pool/debmirror
BANDWIDTH=500
if test -s $DEBMLOG
then
test -f $DEBMLOG.3.gz && mv $DEBMLOG.3.gz $DEBMLOG.4.gz
test -f $DEBMLOG.2.gz && mv $DEBMLOG.2.gz $DEBMLOG.3.gz
@Torstein-Eide
Torstein-Eide / gist:be8bfccca96f6d3c30d0b621f28d2ee7
Created February 13, 2021 22:11 — forked from jfeilbach/gist:18b08ea0ed9eaf844d643ab092905973
tvOS.xml for plex (modified) for use with AppleTV 4k
<?xml version="1.0" encoding="utf-8"?>
<Client name="tvOS">
<!-- Author: Plex Inc. -->
<!-- This profile is used by A10X-based tvOS (Apple TV 4K) devices using the MPV ("experimental") video player. Currently, this requires a Plex Pass subscription. -->
<!-- Because Plex does not currently support TrueHD or DTS-MA playback in the client, this audio is transcoded to FLAC. -->
<Settings>
<Setting name="DirectPlayStreamSelection" value="true" />
<Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
</Settings>
<TranscodeTargets>
@Torstein-Eide
Torstein-Eide / update-debian-testing-netboot-image.sh
Created January 1, 2021 15:12
script to update netboot file
#!/bin/bash
## testing result in error
# https://www.reddit.com/r/debian/comments/auogk7/no_kernel_modules_found_when_trying_to_install/
script="update-debian-testing-netboot-image"
dest_dir=
export YOURMIRROR=ftp.no.debian.org # A CDN backed by cloudflare and fastly currently
export ARCH=amd64
chmod 700 /volume?/homes/*/.ssh
chmod 644 /volume?/homes/*/.ssh/authorized_keys
chmod 644 /volume?/homes/*/.ssh/known_hosts
chmod 644 /volume?/homes/*/.ssh/config
import time, keyboard # using module keyboard
A = 0
q = False
w = False
komfeil = 2
while True: # making a loop
time.sleep(0.1)
try: # used try so that if user pressed other than the given key error will not be shown
## Forbindelse feil blokkert