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
#!/bin/bash | |
# | |
# Info: Scipt repairs damaged s3 filenames from aws elb logfiles where the ip is missing | |
# Autor: Julian Meyer | |
# Version: 0.1 | |
# | |
# USE AT YOUR OWN RISK! | |
# Options: |
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
ps aux | grep apache2 | grep -v pts | awk 'BEGIN {print "PID RSS COMMAND"} { total += $6; procs += 1; print $2,$6,$11 } END { print "TOTAL: ",total,"kb /",procs,"=",total/procs, "kb" }' |
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
# FILE: /etc/cron.d/lifespan-stop | |
# stopping this server after lifespan | |
# After 5h 50m +5m | |
@reboot root sleep 350m && /sbin/shutdown -h +5 "Lifespan Halt!" |
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
#!/bin/bash | |
# | |
# Info: Script trys to start an aws instance, if the region is out of capacity | |
# Autor: Julian Meyer | |
# Version: 0.1 | |
# | |
# USE AT YOUR OWN RISK! | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 [instance-id] [...]" |
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 | |
# | |
# Copyright 2015 Julian Meyer | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
# Cleaning DNS Cache | |
# sudo config : <username> localhost=NOPASSWD:/<path_to_command>/dnscache.command | |
sudo dscacheutil -flushcache | |
osascript -e 'tell application "Terminal" to quit' & exit |
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
VOLUME=$(osascript -e "get output volume of (get volume settings)") && osascript -e "set volume output volume 30" && say -v Whisper "I'm watching you" && osascript -e "set volume output volume $VOLUME" && unset VOLUME | |
# Set it as a Cronjob every 30 Minutes for example :-) |
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
find . -printf "%T@ %Tc %p\n" | sort -n | |
find /home/ -type f -printf "%T@ %p\n" | sort -n | awk '{print $2}'|xargs ls -l |
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
touch /file && chattr +S /file && cat /dev/urandom >> /file |
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
cat ${LOOPDEV} |
OlderNewer