This file contains hidden or 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
| pathadd() { | |
| if [ -d "$1" ] && ! echo $PATH | grep -E -q "(^|:)$1($|:)" ; then | |
| if [ "$2" = "after" ] ; then | |
| PATH="$PATH:${1%/}" | |
| else | |
| PATH="${1%/}:$PATH" | |
| fi | |
| fi | |
| } |
This file contains hidden or 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/sh | |
| ### BEGIN INIT INFO | |
| # Provides: mongodb | |
| # Required-Sart: | |
| # Required-Stop: | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: mongodb | |
| # Description: mongo db server |
This file contains hidden or 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 | |
| /* | |
| Mantis -> PivotalTracker export script | |
| Based on scripts from this support thread: | |
| - http://community.pivotaltracker.com/pivotal/topics/synchronize_pivotal_tracker_with_mantis | |
| To configure: | |
| 1.) Put this script in your Mantis root folder (one that contains 'core.php') | |
| 2.) Create an "Other" integration in Pivotal | |
| 3.) In the integration set a Mantis user/pass that has read rights on the project |
This file contains hidden or 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 | |
| # options: | |
| # remove stopped containers and untagged images | |
| # $ dkcleanup | |
| # remove all stopped|running containers and untagged images | |
| # $ dkcleanup --reset | |
| # remove containers|images|tags matching {repository|image|repository\image|tag|image:tag} | |
| # pattern and untagged images | |
| # $ dkcleanup --purge {image} |
This file contains hidden or 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
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Kill existing LXC docker instances | |
| sudo apt-get purge lxc-docker -y | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
| sudo sh -c "echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list" |
This file contains hidden or 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 | |
| # Shamelessly stolen from https://gist.github.com/eduardocardoso/82a629882ddb02ab3677 | |
| set -o errexit | |
| echo "Removing exited docker containers..." | |
| docker ps -a -f status=exited -q | xargs -r docker rm -v | |
| echo "Removing untagged images..." | |
| docker images --no-trunc | grep "<none>" | awk '{print $3}' | xargs -r docker rmi |
This file contains hidden or 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 | |
| # This script is used by Nagios to post alerts into a Slack channel | |
| # using the Incoming WebHooks integration. Create the channel, botname | |
| # and integration first and then add this notification script in your | |
| # Nagios configuration. | |
| # | |
| # All variables that start with NAGIOS_ are provided by Nagios as | |
| # environment variables when an notification is generated. | |
| # A list of the env variables is available here: |