Skip to content

Instantly share code, notes, and snippets.

View The1andONLYdave's full-sized avatar

David-Lee Kulsch The1andONLYdave

  • Linux Admin @ omeco GmbH && Founder of DLK Appentwicklung
  • Somewhere in the south of Germany.
View GitHub Profile
@The1andONLYdave
The1andONLYdave / batch-strace.sh
Created November 24, 2015 15:36 — forked from hydra35/batch-strace.sh
strace all the php-fpm worker processes
#!/bin/bash
additional_strace_args="$1"
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6)
while read -r pid;
do
if [[ $pid != $MASTER_PID ]]; then
nohup strace -r -p "$pid" $additional_strace_args >"$pid.trc" 2>&1 &
@The1andONLYdave
The1andONLYdave / known_hosts_autocomplete.sh
Created August 22, 2016 11:31 — forked from peelman/known_hosts_autocomplete.sh
Bash AutoComplete from known_hosts
# add to ~/.bash_profile, and close/reopen a shell. Will autocomplete any hosts found in known_hosts.
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh
@The1andONLYdave
The1andONLYdave / bash_to_zsh_history.rb
Created March 26, 2018 10:23 — forked from goyalankit/bash_to_zsh_history.rb
Import bash history to zsh history.
#################################################################
# = This script transfers bash history to zsh history
# = Change bash and zsh history files, if you don't use defaults
#
# = Usage: ruby bash_to_zsh_history.rb
#
# = Author: Ankit Goyal
#################################################################
# change if you don't use default values
#!/bin/bash
while true; do
date >> /mnt/HD/HD_a2/Netzwerkdaten/internet-status.log
ping 8.8.8.8 -c 1 -W 1 | sed -n 3,5p >> /mnt/HD/HD_a2/Netzwerkdaten/internet-status.log
echo "" >> /mnt/HD/HD_a2/Netzwerkdaten/internet-status.log
sleep 59
done
@The1andONLYdave
The1andONLYdave / merge_junit_results.py
Created February 19, 2020 14:17 — forked from cgoldberg/merge_junit_results.py
Merge multiple JUnit XML results files into a single results file.
#!/usr/bin/env python
"""Merge multiple JUnit XML results files into a single results file."""
# MIT License
#
# Copyright (c) 2012 Corey Goldberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal