Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
from socket import socket, AF_INET, SOCK_STREAM
from threading import Thread
from queue import Queue
import CONST
class PortChecker:
def __init__(self, brokeCount=2, tryCount=4, timeOut=600, threads=CONST.threads):
self.pingQueue = Queue()
#include <stdio.h>
main() {
//Инициализация массива
int arr[10];
//Переменная для произведения элементов кратных 3
int composition = 1;
int count = 0;
constructor(data: any,
ajaxSettings: {
type?: string,
url?: string,
dataType?: string,
contentType?: string
},
callbacks?:{
onBeforeDataLoad?: () => void,
onDataLoadSuccess?: () => void,
@movis08
movis08 / server_certificates_to_pem.md
Created August 18, 2016 08:05 — forked from stevenhaddox/server_certificates_to_pem.md
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample