Skip to content

Instantly share code, notes, and snippets.

@matsest
matsest / pandoc-setup.md
Last active May 7, 2021 10:08
pandoc-latex-setup

Pandoc Setup

Description

A simple setup for Sublime to jot down notes in Markdown and compile a nice PDF with LaTeX through Pandoc conversion.

Why? Markdown is quick and easy to write, LaTeX is more of a hassle. But LaTeX produces nice PDFs. Using Pandoc, you can utilize the best features of both worlds by writing in markdown and compiling PDFs with LaTeX, with a simple one-click in your editor. This works fairly well for simple documents and pandoc supports most of Markdown syntax, in addition to supporting a range of variables set in a YAML meta block. Did I mention that it also supports writing LaTeX-style math and other LaTeX-commands in your Document? (Like this: $e^{i\pi}+1 = 0$ )

The output PDF is a A4 paper with 12pt font and 1 inch margins. It uses fancyhead to style the header and footer with date, pagenumbering and title/author. (This can be changed in your Pandoc-settings)

@mondain
mondain / public-stun-list.txt
Last active April 22, 2024 08:55
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@m1r0
m1r0 / wp_insert_attachment_from_url.php
Last active April 11, 2024 12:33
WP: Insert attachment from URL
<?php
/**
* Insert an attachment from a URL address.
*
* @param string $url The URL address.
* @param int|null $parent_post_id The parent post ID (Optional).
* @return int|false The attachment ID on success. False on failure.
*/
function wp_insert_attachment_from_url( $url, $parent_post_id = null ) {
@bamanzi
bamanzi / gist:3121820
Created July 16, 2012 09:32
Extract notes' title & url from Evernote exported file (*.enex)
from lxml import etree
def enex_list_notes_info(enex_file_name):
f = file(enex_file_name, "r")
enex = etree.parse(f)
notes = enex.xpath("//note")
for note in notes:
title = url = ""
etitle = note.xpath("title")
@ledti
ledti / udisks_functions
Created February 22, 2011 01:02
Simplifies mounting and unmounting with udisks2.
#!/usr/bin/env bash
# udisks_functions: https://bbs.archlinux.org/viewtopic.php?id=109307
# last modified: 2012/08/05
# functions: sdm, sdu, mcm, mcu, srm, sru, fdm, and fdu.
# aliases: sd*m, sd*u, mc*m, and mc*u.
# options:
enable_device="true"
enable_mmc="true"