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 bash | |
# Kills all children for passed PID recursively | |
function recursive_kill { | |
children=`pgrep -P $1` | |
if [ -z "$children" ]; then | |
kill -9 $1 && echo 'finish $1' | |
else | |
for child in $children; do |
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
# -*- coding: utf-8 -*- | |
from gunicorn import util | |
from gunicorn.app.base import Application | |
class FixtureApplication(Application): | |
def __init__(self, options=None): | |
self.options = options | |
self.usage = None |
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
crude version of https://github.com/codingtony/udev-monitor-hotplug/blob/master/usr/local/bin/monitor-hotplug.sh | |
cat /usr/local/bin/hotplug_monitor.sh | |
#!/bin/bash | |
export XAUTHORITY=/home/USER/.Xauthority | |
export DISPLAY=:0.0 | |
if [ $(cat /sys/class/drm/card0-VGA-1/status) == "connected" ]; then | |
/usr/bin/xrandr -d :0 --output VGA1 --right-of LVDS1 --auto | |
else |