Skip to content

Instantly share code, notes, and snippets.


Brad Stancel stancel

View GitHub Profile
stancel /
Created Aug 12, 2021 — forked from Scherlac/
A terrible way to connect to MS SQL Server and dump the certificate as a PEM
import sys
import pprint
import struct
import socket
import ssl
from time import sleep
# Standard "HELLO" message for TDS
prelogin_msg = bytearray([ 0x12, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x06, 0x01, 0x00, 0x20,
0x00, 0x01, 0x02, 0x00, 0x21, 0x00, 0x01, 0x03, 0x00, 0x22, 0x00, 0x04, 0x04, 0x00, 0x26, 0x00,
stancel / .gitignore-cookiecutter-templates
Created Apr 1, 2020
.gitignore file that I automatically pull into new cookiecutter template repos
View .gitignore-cookiecutter-templates
# Git Ignore File - Cookiecutter Templates
# Mac .DS_Store Files
# IDE Files
stancel / sphinx-custom.css
Created Feb 24, 2020
Generic custom CSS file used as a starting point for Sphinx repos and projects
View sphinx-custom.css
.blue {
color: blue;
stancel / docutils-custom.css
Created Feb 24, 2020
Starting point of a custom generic CSS file used when exporting certain parts of a Sphinx repo using Docutils tools (rst2pdf, etc.) instead of Sphinx
View docutils-custom.css
textColor: #011daa
fontName: stdBold
stancel / vscode-settings.json
Created Feb 24, 2020
Default VSCode settings.json used in Sphinx documentation sites and repos.
View vscode-settings.json
"restructuredtext.builtDocumentationPath": "${workspaceRoot}/_build/html",
"restructuredtext.updateOnTextChanged" : "true",
"restructuredtext.updateDelay" : 300,
"restructuredtext.languageServer.disabled": false,
//"restructuredtext.sphinxBuildPath": "${workspaceFolder}/source/_build/html"
"restructuredtext.confPath": "${workspaceFolder}/source",
"restructuredtext.linter.extraArgs": [
"--ignore D001"
stancel / workspace.code-workspace
Created Feb 24, 2020
Default template for VSCode workspace files used for Sphinx repositories since they are synced across different Operating Systems
View workspace.code-workspace
"folders": [
"path": "."
"settings": {}
stancel / sphinx-vscode-build-tasks.json
Created Feb 24, 2020
This is the VSCode tasks.json file that I auto download and populate into new Sphinx documentation repos
View sphinx-vscode-build-tasks.json
// See
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
"label": "Sphinx",
"type": "shell",
"command": "make clean && make html",
"script": "build",
stancel / .gitignore-sphinx-documentation
Last active Dec 11, 2019
.gitignore I use as the default for new Sphinx and ReSTructured Text documentation projects
View .gitignore-sphinx-documentation
# Git Ignore File
# Mac .DS_Store Files
stancel /
Created Dec 11, 2019
Git Repo Info Template that shows the repo info and reminds me to exclude this folder from Syncthing

Git Repo Info


Repo Type: Public or Private (adjust here)

stancel / .gitattributes-standard
Created Dec 11, 2019
My standard .gitattribute file that I like to add to my Git repos and projects
View .gitattributes-standard
# Brad adding this file to deal with issues of Windows and Linux line endings
# on the project basis.
# *********************************************************
# *********************************************************
# @create: 5/13/2017
# @modified: 9/21/2019
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).