Skip to content

Instantly share code, notes, and snippets.

View pyther's full-sized avatar

Matthew Gyurgyik pyther

View GitHub Profile
--- baseimg/overlayfs/overlayfs.py.orig 2015-08-24 12:24:00.067498108 -0400
+++ baseimg/overlayfs/overlayfs.py 2015-08-24 12:39:10.807999806 -0400
@@ -65,8 +65,9 @@ def should_touch():
if not path.exists(mtab):
return False
with open(mtab, 'r') as f:
- line = f.readline()
- return line.startswith('overlay / overlay')
+ for line in f.readlines():
+ if line.startswith('overlay / overlay'):
@pyther
pyther / rec_vhs.sh
Created July 26, 2009 02:23
Simple shell script to configure alsa the record from capture card
#!/bin/bash
function set_alsa {
#Unmute Line
amixer sset Line 100 -q
amixer sset Line unmute -q
#Mute PCM record
amixer sset PCM Capture 0 -q
Puppet::Functions.create_function(:modularfile) do
def modularfile(path)
path = path.gsub('.', '0x2e')
call_function('hiera', [path])
end
end
#!/bin/bash
# Backup Script - Matthew Gyurgyik (pyther@pyther.net)
#
# Backup a System using rsync and --link-dest (hard links)
# Backups are stored in a folder called $Year$Month$Day ex. 2010Oct18
#
# Exclude file format:
# /backup/exclude.txt
# + /etc
# + /home
#!/bin/bash
# Detects Linux Distribution
#
# Many Distributions have lsb_release or use /etc/lsb_release
# For those that do not we have some fallback cases
#
# The goal is to report the Distribution and Version that is being used
# An icon will be display based on the first word of the distro's name.
# Example: Scientific Linux 6.1 will be Scientific.png or Scientific.gif
Name: keepassx
Version: 2.0
Release: 1%{?dist}
Summary: Cross-platform password manager
Group: User Interface/Desktops
License: GPLv2+
URL: http://www.keepassx.org
Source0: keepassx-%{version}.tar.gz
BuildRequires: qt4-devel > 4.1
BuildRequires: libXtst-devel
package main
import (
"fmt"
"github.com/google/gopacket"
"github.com/google/gopacket/pcap"
"github.com/google/gopacket/layers"
"log"
)
@pyther
pyther / ipda.py
Last active January 28, 2021 07:09
Listens for networkd signals and deprecate the ip6 route on the interface when the interface gets reconfigured
#!/usr/bin/env python3
from functools import cache
import argparse
import dbus
import subprocess
import json
import dbus.mainloop.glib
#!/usr/bin/env python
import argparse
import re
import datetime
import ipaddress
import os
import sys
def get_iface_networks(dev):
#!/bin/bash
# Detects Linux Distribution
#
# Most Distributions have lsb_release or use /etc/lsb_release
# For those that do not we have some fallback cases
OS=$(uname -s)
VER=$(uname -r)