Skip to content

Instantly share code, notes, and snippets.

View mmarcott's full-sized avatar

Mike Marcott mmarcott

View GitHub Profile
@mmarcott
mmarcott / change-workgroup.ps1
Created February 12, 2019 17:31
change workgroup in powershell
#Add-Computer -WorkGroupName MyWorkGroup
$MyWorkGroup = Read-Host
@mmarcott
mmarcott / new-local-user.ps1
Last active February 12, 2019 15:30
new local user via Powershell
write-host Enter password:
$Password = Read-Host -AsSecureString
New-LocalUser "NEW_ACCOUNT_NAME" -Password $Password -FullName "USER_FULL_NAME" -Description "Description of this account."
@mmarcott
mmarcott / gist:5da78d347c97cb6329daa74de6f6b4cf
Created January 11, 2018 12:27 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@mmarcott
mmarcott / conky.conf-color
Created October 10, 2016 01:51 — forked from anonymous/conky.conf-color
cwmrc and conky files used on this video: https://youtu.be/y9pyChAL4AE
conky.config = {
double_buffer=true,
alignment="top_middle",
own_window=true,
own_window_type="normal",
own_window_colour="#000000",
--own_window_argb_visual=true,
--own_window_argb_value=240,
draw_borders=false,
draw_graph_borders=false,
@mmarcott
mmarcott / check-public-ip.ps1
Created October 6, 2016 20:32
Powershell check public IP address
#requires -Version 3.0
Invoke-RestMethod -Uri http://checkip.amazonaws.com/
@mmarcott
mmarcott / pkg.conf
Created August 24, 2016 12:17
Openbsd package path
installpath = http://openbsd.cs.fau.de/pub/OpenBSD/%c/packages/%a/
@mmarcott
mmarcott / install.conf
Created December 30, 2015 19:33
OpenBSD autoinstall config file
Terminal type? [vt220] vt220
System hostname? (short form, e.g. 'foo') [autoinstalltest] autoinstalltest
Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0] vio0
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] dhcp
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 10.1.1.250 (00:15:17:20:bb:94)
bound to 10.1.1.178 -- renewal in 21600 seconds.
IPv6 address for vio0? (or 'rtsol' or 'none') [none] none
@mmarcott
mmarcott / tk
Last active February 11, 2019 20:35
My boxstarter script
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$true # Is this a machine with no login password?
#$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showFileExtensions
Enable-RemoteDesktop
#Disable-InternetExplorerESC
@mmarcott
mmarcott / .profile
Created July 27, 2015 19:14
OpenBSD PKG_PATH
PKG_PATH=ftp://filedump.se.rit.edu/pub/OpenBSD/`uname -r`/packages/`uname -m`/
export PKG_PATH
@mmarcott
mmarcott / docx2md.md
Last active August 29, 2015 14:07 — forked from vdavez/docx2md.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.