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
from requests import Session | |
from requests import adapters | |
from urllib3 import poolmanager | |
from ssl import create_default_context, Purpose, CERT_NONE | |
class CustomHttpAdapter (adapters.HTTPAdapter): | |
def __init__(self, ssl_context=None, **kwargs): | |
self.ssl_context = ssl_context | |
super().__init__(**kwargs) |
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
from flask import Flask | |
from uuid import uuid4 | |
app = Flask(__name__) | |
app.config["SECRET_KEY"] = str(uuid4()) | |
IDP_CONFIG = { | |
"well_known_url": "Identity Provider wellknown url: https://{TENANT}.auth0.com/.well-known/openid-configuration", |
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
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
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
{ | |
"variables": { | |
"cosmosDbAccount": { | |
"name": "my-cosmos-db" | |
}, | |
"resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('cosmosDbAccount').name)]", | |
"apiVersion": "[providers('Microsoft.DocumentDB', 'databaseAccounts').apiVersions[0]]" | |
}, | |
"resources": [], | |
"outputs": { |
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
{ | |
"variables": { | |
"computename":"known-vm-name" | |
}, | |
"builders": [{ | |
"type": "azure-arm", | |
"subscription_id": "{{user `subscription_id`}}", | |
"client_id": "{{user `client_id`}}", | |
"client_secret": "{{user `client_secret`}}", |
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
function Register-EventScript { | |
param ( | |
[string] $eventToRegister, # Either Startup or Shutdown | |
[string] $pathToScript, | |
[string] $scriptParameters | |
) | |
$path = "$ENV:systemRoot\System32\GroupPolicy\Machine\Scripts\$eventToRegister" | |
if (-not (Test-Path $path)) { | |
# path HAS to be available for this to work |
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
# This Powershell script can be used on a server to redirect HTTP/HTTPS | |
# traffic to different sources. Make sure your DNS routes the requests | |
# for the source URLs to this server. It automatically forwards the URL | |
# to the destination server without altering the rest of the URL. | |
# | |
# You can use multiple mappings. Of course the 'source' should be | |
# unique, but the destination can occur multiple times. | |
# | |
# Make sure PowerShell is allowed to run this script. You might need to | |
# change PowerShell's policy by running the following command as admin: |
.pem
=> Privacy Enhancement Mail Certificate.key
extension => is a PEM file containing just the private-key.pkcs
|.pfx
|.p12
=> is a fully encrypted passworded container format that contains both pubkic and private certificate pairs.cert
|.cer
|.crt
=> is a public .pem formatted file with diffrent extenssions for windows
*.private.pem
=*.key.pem
=*.key
*.public.pem
=*.crt.pem
=*.crt
=*.cer.pem
=*.cer
- passworded(
*.key
+*.cer
) =*.pkcs
|*.pfx
|*.p12
*.key.pem
+*.crt.pem
in one file =>*.keycer.pem
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
license: gpl-3.0 | |
border: no |
NewerOlder