$ uname -r
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 | |
echo -e "-- Removing exited containers --\n" | |
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes | |
echo -e "\n\n-- Removing untagged images --\n" | |
docker rmi --force $(docker images | awk '/^<none>/ { print $3 }') | |
echo -e "\n\n-- Removing volume directories --\n" | |
docker volume rm $(docker volume ls --quiet --filter="dangling=true") |
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
#!/usr/bin/env python | |
# -*- coding utf-8 -*- | |
# | |
# Copyright 2016 Akshay Raj Gollahalli | |
import dns.resolver | |
def get_records(domain): | |
""" |
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
import boto3 #Calling Boto3 library | |
ec2 = boto3.resource('ec2', region_name='us-west-2') | |
sgs = ec2.security_groups.all() # Fetching all security groups in AWS account | |
all_sgs = set([sg.group_name for sg in sgs]) # Creating a list of only security group names | |
instances = ec2.instances.all() # Getting all instances in AWS account |
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
import logging | |
import sys | |
from logging.handlers import TimedRotatingFileHandler | |
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
LOG_FILE = "my_app.log" | |
def get_console_handler(): | |
console_handler = logging.StreamHandler(sys.stdout) | |
console_handler.setFormatter(FORMATTER) |
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
def env = System.getenv() | |
env.each{ | |
println it | |
} | |
1) Go to https://git-scm.com/ and check out the latest version of Git
Currently, the latest version is 2.18.0. Download and extract it and go to the folder of the source code:
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz
tar xf git-2.18.0.tar.gz
cd git-2.18.0/
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
## | |
## Dovecot SSL settings with Intermediate compatibility | |
## Follows Mozilla's Security/Server Side TLS guidelines | |
## https://wiki.mozilla.org/Security/Server_Side_TLS | |
## | |
## | |
## Optionial: | |
## Disable 3DES ciphersuites to prevent CVE-2016-2183 | |
## by appending ":!3DES" to the ssl_cipher_list |
OlderNewer