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
Lst1 = ['11', '13', '11', '12', '11', '13', '12', '12', '12', '13', '11'] | |
Lst2 = ['1/41', '1/34', '1/37', '1/47', '1/41', '1/33', '1/46', '1/45', 'p4', 'p5', 'p6'] | |
Dict1 = {'11': ['1/41', '1/37', '1/141', 'p6'], | |
'12': ['1/47', '1/33', '1/46', 'p4'], | |
'13': ['1/34', '1/33', 'p5']} | |
Dict1 = {} | |
for key, val in zip(Lst1, Lst2): |
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
x = {'a':1, 'b': 2} | |
y = {'c':10, 'd': 11} | |
z = dict(x.items() + y.items()) | |
z | |
{'a': 1, 'b':2, 'c': 10, 'd': 11} |
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
# Howebrew package manager for OS X is useful for installing unix terminal tools. | |
# Install Homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
# Install wget | |
brew install wget | |
brew install openssl | |
# Update homebrew and all your packages |
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
import xml.etree.ElementTree as ET | |
import re | |
import os | |
import sys | |
import subprocess | |
from urllib2 import Request, urlopen | |
from urllib import urlencode | |
from json import load, dumps | |
from base64 import b64encode | |
from xml.etree.ElementTree import Element, SubElement, tostring, ElementTree |
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
import os | |
import re | |
import sys | |
import time | |
from json import load, dumps | |
from urllib2 import Request, urlopen | |
from urllib import urlencode | |
from xml.etree.ElementTree import Element, SubElement, tostring, ElementTree | |
import xml.dom.minidom as minidom |
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
Docker, Ansible, Vagrant, and Docker Swarm: | |
DevOps-lab: | |
http://searchitoperations.techtarget.com/feature/DevOps-lab-Learn-Ansible-to-pick-up-configuration-management-concepts | |
http://searchitoperations.techtarget.com/feature/Learn-DevOps-techniques-and-tools-in-this-home-lab-setup | |
http://searchitoperations.techtarget.com/feature/DevOps-lab-How-to-use-Docker-swarm-mode-to-run-containers-in-VMs | |
Using Vagrant to Deploy Multiple VMs on vSphere: | |
http://buildvirtual.net/using-vagrant-to-deploy-multiple-vms-on-vsphere/ |
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
Centralized log management on Centos7: | |
Two Linux servers ( server @ ip 192.168.0.105 and client @ ip 192.168.0.104). | |
Server setup (Assuming rsyslog package is installed): | |
[root@server ~]# vi /etc/rsyslog.conf # Provides UDP syslog reception$ModLoad imudp$UDPServerRun 514 # Provides TCP syslog reception$ModLoad imtcp$InputTCPServerRun 514 [root@server ~]# service rsyslog restart Verify the syslog server listening. | |
[root@server ~]# netstat -antup | grep 514 tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 8081/rsyslogdtcp 0 0 :::514 :::* LISTEN 8081/rsyslogdudp 0 0 0.0.0.0:514 0.0.0.0:* 8081/rsyslogdudp 0 0 :::514 :::* 8081/rsyslogd | |
Client setup: | |
[root@client ~]# vi /etc/rsyslog.conf At the end of file place the following line to point the client message log to the server | |
*.info;mail.non |
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
#get name of container(s) | |
docker ps | |
#or docker-compose ps | |
docker inspect --format="{{.Id}}" nameofcontainer |
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
Creating a .pem File for SSL Certificate Installations | |
SSL .pem files (concatenated certificate container files), are frequently required for certificate installations when multiple certificates are being imported as one file. | |
This article contains multiple sets of instructions that walk through various .pem file creation scenarios. | |
Creating a .pem with the Entire SSL Certificate Trust Chain | |
Log into your DigiCert Management Console and download your Intermediate (DigiCertCA.crt), Root (TrustedRoot.crt), and Primary Certificates (your_domain_name.crt). | |
Open a text editor (such as wordpad) and paste the entire body of each certificate into one text file in the following order: |
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
==================================================================== | |
HOW TO INSTALL FROM CODE/INSTALLING GIT FROM SOURCE: | |
==================================================================== | |
Step 1 – Prerequsities: | |
---------------------- | |
$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel | |
$ yum install gcc perl-ExtUtils-MakeMake | |
Step 2 – Install Git on CentOS: |
OlderNewer