Skip to content

Instantly share code, notes, and snippets.

Fri Oct 6 22:47:37 UTC 2017
@enriquemanuel
enriquemanuel / SSHrsync.sh
Last active August 24, 2017 22:03 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir>
@enriquemanuel
enriquemanuel / docker_rm_containers
Created August 23, 2017 19:27
Bash commands for removing all docker images/containers
#!/bin/bash
# Remove all containers
docker rm $(docker ps -aq)
# Remove all exited containers
docker rm $(docker ps -aqf status=exited)
@enriquemanuel
enriquemanuel / docker_rm_containers
Created August 23, 2017 19:27
Bash commands for removing all docker images/containers
#!/bin/bash
# Remove all containers
docker rm $(docker ps -aq)
# Remove all exited containers
docker rm $(docker ps -aqf status=exited)
@enriquemanuel
enriquemanuel / paramiko-using-ssh-config.py
Created July 25, 2017 03:50 — forked from acdha/paramiko-using-ssh-config.py
Connecting with paramiko using the user's OpenSSH config
client = paramiko.SSHClient()
client._policy = paramiko.WarningPolicy()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_config = paramiko.SSHConfig()
user_config_file = os.path.expanduser("~/.ssh/config")
if os.path.exists(user_config_file):
with open(user_config_file) as f:
ssh_config.parse(f)
@enriquemanuel
enriquemanuel / minikube.md
Created May 5, 2017 15:18
Minikube description and information

Setting up minikube for development

Minikube lets you simulate a cluster using virtualbox locally. It can be used to test and debug locally instead of the cloud.

Prerequisites

These prerequisites that are required to run minikube are

  • Docker
  • kubectl
  • virtualbox
20164_MUS_6125_01_1
2017-03-23 03:21:15 -0700 - Executed archive for 20164_MUS_6125_01_1 to /tmp/cloud_team/files/
2017-03-23 03:21:15 -0700 - Operation output:
2017-03-23 03:21:15 -0700 - ******************************************************************************
2017-03-23 03:21:15 -0700 - Mar 23, 2017 3:21:15 AM - Status: The operation archive has completed.
2017-03-23 03:21:15 -0700 - ******************************************************************************
2017-03-23 03:21:15 -0700 - Fatal: A fatal error that prevents processing from continuing has occurred. The reason for the error is:
A course with the specified Course ID can not be found.
#!/bin/bash
# needs to be run as root
# how to execute
# bash script.sh action clientid OPS-#### email@address.com
#ACTION='archive'
#CLIENTID='57c93be5643d6'
@enriquemanuel
enriquemanuel / admin_restart.sh
Last active October 18, 2016 20:19
Application Server Restart and email (blackboard)
#!/bin/bash
# Script Created for Corey Lewis
# Description:
## This script will disable the alerts for Operations and LB team.
## Then it will restart this application server
## Its based on the CRON and it will ideally be run at 7PM CST (Server time)
## It will documenet everything and then enable the alerts
## Finally it will send an email when it completes
## For documentation purposes we will save all the logs as well.
@enriquemanuel
enriquemanuel / course_directory_copycheck.sh
Created June 8, 2016 19:33
Check if a list of course_ids were copied analyzing the path and validating if the course_copy folder exists
#!/bin/bash
# this will accept one parameter which is the course ids file list
# then it will go over that list of courses and validating if the course-copy folder exists in it
# finally it will display the information
while read -r line; do
#echo "Text read from file: $line"
if [ ! -d "/usr/local/blackboard/content/vi/BBLEARN/courses/1/$line/course-copy/" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
echo "$line does not contain course-copy directory"