This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.
$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
| # Name: asyncParse.py | |
| # Version: 1.0 | |
| # Author: Evolution0 | |
| # Email: [email protected] | |
| # Description: Parse URLs in Youtube User's Playlist (Video Playlist not Favorites) | |
| # Use python 3.5 and later | |
| # Agreement: You can use, modify, or redistribute this tool under | |
| # the terms of GNU General Public License (GPLv3). | |
| # This tool is for educational purposes only. Any damage you make will not affect the author. | |
| # Usage: python asyncParse.py youtubeURLhere |
| #!/bin/bash | |
| # | |
| # This is sp, the command-line Spotify controller. It talks to a running | |
| # instance of the Spotify Linux client over dbus, providing an interface not | |
| # unlike mpc. | |
| # | |
| # Put differently, it allows you to control Spotify without leaving the comfort | |
| # of your command line, and without a custom client or Premium subscription. | |
| # |
The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd process, you'll need a copy of the ClamAV databases.
Create a freshclam.conf file and configure as so
| #!/usr/bin/python | |
| import numpy | |
| import pyaudio | |
| import re | |
| import sys | |
| WIDTH = 79 | |
| BOOST = 1.0 |
| Disable vim automatic visual mode on mouse select | |
| issue: :set mouse-=a | |
| add to ~/.vimrc: set mouse-=a | |
| my ~/.vimrc for preserving global defaults and only changing one option: | |
| source $VIMRUNTIME/defaults.vim | |
| set mouse-=a |
| #!/usr/bin/env bash | |
| # obtains all data tables from database | |
| TS=`sqlite3 $1 "SELECT tbl_name FROM sqlite_master WHERE type='table' and tbl_name not like 'sqlite_%';"` | |
| # exports each table to csv | |
| for T in $TS; do | |
| sqlite3 $1 <<! | |
| .headers on |
| #!/usr/bin/python2 | |
| import serial | |
| import re, sys, signal, os, time, datetime | |
| import RPi.GPIO as GPIO | |
| BITRATE = 9600 | |
| GPIO.setmode(GPIO.BOARD) | |
| GPIO.setup(7, GPIO.OUT) | |
| GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP) |