This file contains 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 | |
# Script to toggle microphone mute | |
# Toggles the preferred (usb) mic if present, or the fallback mic | |
# device.description from `pacmd list-sources` | |
preferred_mic = "USB PnP Audio Device Mono" | |
fallback_mic = "HD Audio Controller Stereo Microphone" | |
This file contains 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 | |
declare(strict_types=1); | |
/** | |
* This reads the php.ini the current CLI process is using and creates a copy | |
* so we can kick out xdebug and use the created config for phan without having to remove xdebug globally. | |
*/ | |
function cleanIniFile(string $content): string { | |
$noComments = preg_replace("/^;.*\n/m", '', $content); |
This file contains 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 xml.etree.ElementTree as ET | |
et = ET.parse('logfile.xml') | |
root = et.getroot() | |
for mastersuites in root: | |
for suite in mastersuites: | |
if not "file" in suite.attrib: | |
continue |
This file contains 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 os | |
import glob | |
workshop = os.path.join(os.getcwd(), "workshop", "content", "280160") | |
os.chdir(workshop) | |
c = d = 0 | |
# Remove existing symlinks | |
scan = os.scandir(workshop) |