This file contains hidden or 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
<?php | |
class StringTemplate | |
{ | |
/** | |
* The input / base string template to use. | |
* | |
* @param string|null | |
*/ | |
protected $template = null; |
This file contains hidden or 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 python3 | |
import subprocess | |
# Hoeveelheid tijd (in minuten hier) welke een gebruiker inactief mag zijn | |
threshold = 30 | |
# Bepaal welke gebruiker(s) er actief zijn en haal hier de velden uit welke | |
# nodig zijn | |
output = subprocess.run(['w', '-sh'], capture_output=True, text=True).stdout |
This file contains hidden or 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 | |
# Removes the xorg-x11-drv-nouveau package from this machine, because it's not needed | |
sudo dnf remove xorg-x11-drv-nouveau -y | |
# Blacklist the nouveau module as a module and in dracut | |
sudo echo 'blacklist nouveau' > /etc/modprobe.d/blacklist-nouveau.conf | |
sudo echo 'omit_drivers+=" nouveau "' > /etc/dracut.conf.d/blacklist-nouveau.conf | |
# Backup the current initramfs |
This file contains hidden or 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 | |
# Which repos should we sync? You can edit this list to your | |
# hearts content. The values it accepts can be checked with | |
# the "$ yum repolist" command. Make sure you have yum-utils | |
# installed, first. | |
REPOS="base updates extras epel" | |
# Loop over the repos defined above and reposync them all, | |
# followed by a createrepo. |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Generated with glade 3.22.1 --> | |
<interface> | |
<requires lib="gtk+" version="3.14"/> | |
<template class="ShowdownWindow" parent="GtkApplicationWindow"> | |
<property name="width_request">640</property> | |
<property name="height_request">480</property> | |
<property name="can_focus">False</property> | |
<property name="title" translatable="yes">Markdown Viewer</property> | |
<property name="default_width">1100</property> |
This file contains hidden or 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 creates a backup for all running libvirtd domains on the host it's | |
# run on. | |
# | |
# I created this script because I needed a lightweight backup solution for a pure libvirtd | |
# virtual machine host. | |
# | |
# You can use / modify this script however you like. All I ask is that if you find a bug or something | |
# very wrong (or if you find a massive upgrade point) is that you let me know! |
This file contains hidden or 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
<?php | |
namespace SebastiaanFranken; | |
use Exception; | |
class Router | |
{ | |
/** | |
* @var array $routes The routing table | |
*/ |
This file contains hidden or 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 | |
# Version 0.2 by Sebastiaan Franken | |
# This is meant and tested on Fedora and Fedora only, with systemd-boot (bootctl) | |
# Place this file in /etc/kernel/postinst.d/ and don't forget to make it executable | |
# with chmod +x /etc/kernel/postinst.d/bootctl-postinst.sh | |
# | |
# Also, don't forget to modify the rootpath variable to reflect your situation | |
[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel |
This file contains hidden or 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 python3.5 | |
import os | |
import sys | |
import gi | |
gi.require_version("Gtk", "3.0") | |
gi.require_version("Gdk", "3.0") | |
gi.require_version("Notify", "0.7") | |
gi.require_version("GtkSource", "3.0") |
This file contains hidden or 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 | |
LAST=$(dnf list installed kernel.x86_64 | column | tail -n1 | tr -s " " | cut -d " " -f2) | |
INITRAMFS=/boot/initramfs-$(LAST).x86_64 | |
VMLINUZ=/boot/vmlinuz-$(LAST).x86_64 | |
cp $INITRAMFS /boot/efi/initramfs.img | |
cp $VMLINUZ /boot/efi/vmlinuz |
NewerOlder