Skip to content

Instantly share code, notes, and snippets.

Avatar

Brad Stancel stancel

View GitHub Profile
@stancel
stancel / get_tds_cert.py
Created Aug 12, 2021 — forked from Scherlac/get_tds_cert.py
A terrible way to connect to MS SQL Server and dump the certificate as a PEM
View get_tds_cert.py
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
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
.DS_Store
._DS_Store
# IDE Files
.idea
*.swp
@stancel
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
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
styles:
blue:
textColor: #011daa
fontName: stdBold
@stancel
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
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
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 https://go.microsoft.com/fwlink/?LinkId=733558
// 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
stancel / _GIT_REPO_INFO.md
Created Dec 11, 2019
Git Repo Info Template that shows the repo info and reminds me to exclude this folder from Syncthing
View _GIT_REPO_INFO.md

Git Repo Info

TO-BE-FILLED-IN

Repo Type: Public or Private (adjust here)

	origin	PASTE-HTTP-LINK-HERE
	origin	PASTE-GIT-LINK-HERE
@stancel
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.
# *********************************************************
# * NO ONE BUT BRAD SHOULD EDIT THIS FILE!
# *********************************************************
# @create: 5/13/2017
# @modified: 9/21/2019
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
@stancel
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
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Mac .DS_Store Files
.DS_Store
._DS_Store