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
.loader { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin-left: -50px; | |
margin-top: -50px; | |
border: 16px solid #f3f3f3; | |
border-top: 16px solid #3498db; | |
border-radius: 50%; |
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
#!/usr/bin/env swift -suppress-warnings | |
import Foundation | |
import Security | |
import CommonCrypto | |
import CryptoKit | |
let sema = DispatchSemaphore(value: 0) | |
// Structure to hold the api response values we need |
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
#!/usr/bin/env ruby -W0 | |
require 'net/http' | |
require 'openssl' | |
require 'json' | |
require 'digest' | |
def validate_cert_for_domain(domain) | |
uri = URI("https://api.cert.ist/#{domain}") | |
response = Net::HTTP.get(uri) |
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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text.Json; | |
namespace CertificatePinningTutorial | |
{ | |
internal class Program |
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 time | |
import netifaces | |
from scapy import sendrecv | |
from scapy.layers import l2 | |
_SLEEP_INTERVAL = 5 | |
DEBUG = True | |
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 typing | |
def safer_execute(method: typing.Callable[[typing.Any, typing.Optional[typing.Dict[str, typing.Any]]], typing.Any], | |
errors: typing.List[typing.Type[Exception]], | |
*args, default=None, **kwargs): | |
try: | |
return method(*args, **kwargs) | |
except tuple(errors): | |
if callable(default): |
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
#!/usr/bin/env python | |
import json | |
from datetime import datetime | |
from boto3 import Session | |
BUCKET_NAME = "my-sweet-bucket" | |
prefix = 'my-sweet-dir' | |
session = Session(region_name='us-east-1', profile_name='my.sweet.profile.name') |
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 hashlib | |
import io | |
import json | |
import socket | |
import ssl | |
from base64 import b64encode | |
from json import JSONDecodeError | |
from typing import Any, Dict, Optional | |
from urllib import parse |
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
resource "null_resource" "write_py" { | |
triggers { | |
time = "${timestamp()}" | |
} | |
provisioner "local-exec" { | |
command = <<PYTHON | |
echo "import json | |
from concurrent.futures import ThreadPoolExecutor | |
from time import sleep |
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
$ TF_LOG=trace terraform plan | |
2017/11/21 10:50:23 [INFO] Terraform version: 0.11.0 ec9d4f1d0f90e8ec5148f94b6d634eb542a4f0ce+CHANGES | |
2017/11/21 10:50:23 [INFO] Go runtime version: go1.9 | |
2017/11/21 10:50:23 [INFO] CLI args: []string{"/Users/Jonathan.Stanford/bin/terraform", "plan"} | |
2017/11/21 10:50:23 [DEBUG] Attempting to open CLI config file: /Users/jonathan.stanford/.terraformrc | |
2017/11/21 10:50:23 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2017/11/21 10:50:23 [INFO] CLI command args: []string{"plan"} | |
2017/11/21 10:50:23 [INFO] command: empty terraform config, returning nil | |
2017/11/21 10:50:23 [DEBUG] command: no data state file found for backend config | |
2017/11/21 10:50:23 [DEBUG] New state was assigned lineage "c46e7369-871e-4fa2-a20b-a6586036d0e9" |
NewerOlder