Skip to content

Instantly share code, notes, and snippets.

View lucasmodrich's full-sized avatar
:octocat:
Focusing

LM lucasmodrich

:octocat:
Focusing
View GitHub Profile
@ryangray
ryangray / buttondown.css
Created February 22, 2012 06:45
A clean, minimal CSS stylesheet for Markdown, Pandoc and MultiMarkdown HTML output.
/*
Buttondown
A Markdown/MultiMarkdown/Pandoc HTML output CSS stylesheet
Author: Ryan Gray
Date: 15 Feb 2011
Revised: 21 Feb 2012
General style is clean, with minimal re-definition of the defaults or
overrides of user font settings. The body text and header styles are
left alone except title, author and date classes are centered. A Pandoc TOC
@vdavez
vdavez / docx2md.md
Last active April 21, 2024 20:05
Convert a Word Document into MD

Converting a Word Document to Markdown in Two Moves

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

The Solution

As it turns out, there are several open-source tools that allow for conversion between file types. Pandoc is one of them, and it's powerful. In fact, pandoc's website says "If you need to convert files from one markup format into another, pandoc is your swiss-army knife." But, although pandoc can convert from markdown into .docx, it doesn't work in the other direction.

@bertvv
bertvv / pandoc.Makefile
Last active November 24, 2022 08:55
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src
#!/bin/bash
# Build a commit frequency list.
ROW_LIMIT=20
git log --name-status $* | \
grep -E '^[A-Z]\s+' | \
cut -c3-500 | \
sort | \
uniq -c | \
@sarangbk
sarangbk / Base64 to String (VARCHAR) and String (VARCHAR) to Base64.sql
Created June 20, 2016 19:48
MSSQL Convert a VARCHAR to Base64 encoding and vice-versa
-- VARCHAR TO Base64
IF OBJECT_ID (N'[dbo].[uFnStringToBase64]', N'FN') IS NOT NULL
DROP FUNCTION uFnStringToBase64;
GO
CREATE FUNCTION [dbo].[uFnStringToBase64]
(
@InputString VARCHAR(MAX)
)
RETURNS VARCHAR(MAX)
AS
@forivall
forivall / gh-pandoc-LICENSE.md
Last active September 20, 2023 15:28
Github-style css for pandoc

The MIT License (MIT)

Copyright (c) 2016-2017 Emily M Klassen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@boseji
boseji / Rapi-Secure.md
Last active April 6, 2024 19:35
Securing the Raspberry Pi
@JamesNK
JamesNK / validate-schema.ps1
Last active July 1, 2021 15:38
Validate Schema from PowerShell
$ErrorActionPreference = "Stop"
$NewtonsoftJsonPath = Resolve-Path -Path "bin\Newtonsoft.Json.dll"
$NewtonsoftJsonSchemaPath = Resolve-Path -Path "bin\Newtonsoft.Json.Schema.dll"
Add-Type -Path $NewtonsoftJsonPath
Add-Type -Path $NewtonsoftJsonSchemaPath
$source = @'
public class Validator
@deadlyfingers
deadlyfingers / wordpress-html-to-md.rb
Last active February 13, 2022 12:56
Converts Wordpress .html to Markdown .md file
# Converts Wordpress .html to Markdown .md file
# usage:
# ruby ./wordpress-html-to-md.rb "_posts/post.html"
# ruby ./wordpress-html-to-md.rb "_posts"
# requires:
# gem install reverse_markdown
require 'fileutils'
@JaimeStill
JaimeStill / README.md
Last active April 12, 2024 06:47
ASP.NET Core Active Directory Integration

Active Directory Authentication

This will provide an example of integrating Active Directory authentication in an ASP.NET Core app.

Note, you'll need to be running on a Windows domain with Visual Studio debugging in IIS Express for this to work.

Setup

In launchSettings.json, you'll want to modify iisSettings by turning on windowsAuthentication: