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
sudo: required | |
services: | |
- docker | |
before_install: | |
- sudo rm /usr/local/bin/docker-compose | |
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose | |
- chmod +x docker-compose | |
- sudo mv docker-compose /usr/local/bin |
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
from django.shortcuts import render | |
def error_404(request, exception): | |
data = {} | |
return render(request,'certman/404.html', data) | |
def error_500(request, exception): | |
data = {} | |
return render(request,'certman/500.html', data) |
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
#Abdurrahim YILDIRIM# | |
#Define file that you need to monitor#### | |
$targetFile = "C:\HPOM\ProgramData\HP\HP BTO Software\shared\tmp\queues\MsgQueue" | |
$path_file = "C:\HPOOconfig\SystemControl\quee_size_control" | |
$fileSize = ((Get-Item $targetFile).length/1KB) | |
$friendlySize = ([math]::Round($fileSize, 2)) | |
$sto = "yourmail@casesup.com" | |
echo $fileSize | |
if ($fileSize -gt 100) | |
{ |
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 | |
host=$1 | |
verify=$2 | |
openssl s_client -showcerts -verify $verify -connect $host:443 < /dev/null | awk '/BEGIN/,/END/{ if(/BEGIN/){a++}; out="certout"a".pem"; print >out}' | |
openssl x509 -noout -text -purpose -in certout1.crt | |
openssl x509 -noout -text -purpose -in certout2.crt | |
######How to run script########### | |
# bash test.sh google.com 3 |
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
##Windows## | |
set OPENSSL_CONF=openssl.cnf | |
##Linux### | |
export OPENSSL_CONF=openssl.cnf | |
##Windows or Linux## | |
openssl x509 -req -days 760 -in Client.csr -CA RootCA.crt -CAkey RootCA.pem -CAcreateserial -out Client.crt -extfile openssl.cnf -extensions usr_cert -sha256 |
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
##Add this lines to the openssl.cnf file## | |
[ usr_cert ] | |
basicConstraints = CA:FALSE | |
nsCertType = client | |
keyUsage = digitalSignature, keyEncipherment | |
extendedKeyUsage = clientAuth | |
nsComment = "OpenSSL Certificate for SSL Client" |
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 consul | |
def consul_conn_check(host): | |
c = consul.Consul(host=host) | |
state = False | |
try: | |
c.catalog.nodes() | |
state = True | |
except ConnectionError: | |
pass | |
finally: |
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 /usr/lib/systemd/system/consulv1-bootstrap.service | |
[Unit] | |
Description=Consul Agent (BootStrap) | |
After=network.target | |
[Service] | |
Restart=on-failure | |
User=appuser | |
Group=appgroup |
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
# vi /appdata/consulv1/config/bootstrap.json | |
{ | |
"bootstrap": true, | |
"server": true, | |
"data_dir": "/appdata/consulv1/data", | |
"encrypt": "e6c0648e561dccadad32d6a3e579b63d", | |
"datacenter": "DC1", | |
"log_level": "INFO", | |
"enable_syslog": true, | |
"disable_update_check": true, |