Skip to content

Instantly share code, notes, and snippets.

View n2i's full-sized avatar

n2i n2i

  • ~
View GitHub Profile
@n2i
n2i / docx2md.md
Created August 23, 2016 06:58 — forked from vdavez/docx2md.md
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.

@n2i
n2i / README.md
Created August 5, 2016 07:44 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan

OUTDATED, see comments below

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@n2i
n2i / letsencrypt.md
Created July 28, 2016 11:14 — forked from xrstf/letsencrypt.md
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@n2i
n2i / latex.this-page-intentionally-left-blank.tex
Created July 25, 2016 16:01 — forked from philipptempel/latex.this-page-intentionally-left-blank.tex
LaTeX: How to have "This page intentionally left blank"
\documentclass[twoside]{scrreprt}
\makeatletter
\def\cleardoublepage{\clearpage%
\if@twoside
\ifodd\c@page\else
\vspace*{\fill}
\hfill
\begin{center}
@n2i
n2i / badwolf.muttrc
Created June 20, 2016 17:52
Badwolf colorscheme for mutt
color normal color15 color233
color error brightcolor15 color196
color indicator color15 color235
color status brightcolor39 color233
color hdrdefault color245 color233
color header brightcolor214 color233 "^(Subject): "
color signature color243 color233
color body color137 color233 [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
@n2i
n2i / .Xresources-hybrid-reduced-contrast
Created June 20, 2016 17:49 — forked from w0ng/.Xresources-hybrid-reduced-contrast
Terminal colourscheme for use in hybrid.vim (reduced contrast)
! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night:
! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim
! and the reduced contrast background color from Codecademy's online editor:
! https://www.codecademy.com/learn
! vim: ft=xdefaults
*background: #232C31
*foreground: #C5C8C6
! black
*color0: #2D3C46
@n2i
n2i / .Xresources-hybrid
Created June 20, 2016 17:48 — forked from w0ng/.Xresources-hybrid
Terminal colourscheme for use in hybrid.vim
! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night:
! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim
! vim: ft=xdefaults
*background: #1D1F21
*foreground: #C5C8C6
! black
*color0: #282A2E
*color8: #373B41
! red

A server naming scheme


Copyright (c) 2014 Max Teufel

Unlimited redistribution and modification of this document is allowed provided that the above copyright notice and this permission notice remains in tact.


@n2i
n2i / grunt-hugo-lunrjs.md
Created June 5, 2016 14:47 — forked from sebz/grunt-hugo-lunrjs.md
hugo + gruntjs + lunrjs = <3 search
@n2i
n2i / tmux-cheatsheet.markdown
Created May 5, 2016 05:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname