Skip to content

Instantly share code, notes, and snippets.

View stancel's full-sized avatar

Brad Stancel stancel

View GitHub Profile
@stancel
stancel / get_tds_cert.py
Created August 12, 2021 23:30 — forked from Scherlac/get_tds_cert.py
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
stancel / .gitignore-cookiecutter-templates
Created April 1, 2020 17:11
.gitignore file that I automatically pull into new cookiecutter template repos
# Git Ignore File - Cookiecutter Templates
# Mac .DS_Store Files
.DS_Store
._DS_Store
# IDE Files
.idea
*.swp
@stancel
stancel / sphinx-custom.css
Created February 24, 2020 03:46
Generic custom CSS file used as a starting point for Sphinx repos and projects
.blue {
color: blue;
}
@stancel
stancel / docutils-custom.css
Created February 24, 2020 03:44
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
styles:
blue:
textColor: #011daa
fontName: stdBold
@stancel
stancel / vscode-settings.json
Created February 24, 2020 03:34
Default VSCode settings.json used in Sphinx documentation sites and repos.
{
"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 February 24, 2020 03:32
Default template for VSCode workspace files used for Sphinx repositories since they are synced across different Operating Systems
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
@stancel
stancel / sphinx-vscode-build-tasks.json
Created February 24, 2020 03:27
This is the VSCode tasks.json file that I auto download and populate into new Sphinx documentation repos
{
// 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 December 11, 2019 19:50
Git Repo Info Template that shows the repo info and reminds me to exclude this folder from Syncthing

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 December 11, 2019 19:37
My standard .gitattribute file that I like to add to my Git repos and projects
# 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 December 11, 2019 20:16
.gitignore I use as the default for new Sphinx and ReSTructured Text documentation projects
# Git Ignore File
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Mac .DS_Store Files
.DS_Store
._DS_Store