Quickly convert a markdown file into a nice looking PDF formatted in the same way GitHub formats Readme.md files
- Install grip
$ pip install grip
- Install wkhtmltopdf
$ sudo apt-get install wkhtmltopdf
import random | |
CATEGORY_LIST = ["Animals", "Countries", "Fruits", "Vegetables"] | |
CATEGORIES = { | |
"Animals": ["alligator", "bear", "camel", "cat", "cheetah", "chimpanzee", "cow", "crocodile", "deer", "dog", | |
"dolphin", "duck", "elephant", "fish", "fox", "frog", "giraffe", "goat", "hamster", "hippopotamus", | |
"horse", "kangaroo", "lion", "monkey", "octopus", "panda", "pig", "rabbit", "seal", "sheep", "snake", | |
"spider", "squirrel", "tiger", "wolf", "zebra"], | |
"Countries": ["Afghanistan", "Albania", "Algeria", "Argentina", "Armenia", "Aruba", "Australia", "Austria", | |
"Azerbaijan", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Bermuda", "Bhutan", |
Complete installation process: | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev | |
sudo apt-get update | |
sudo apt-get upgrade | |
cd ~ | |
mkdir git | |
cd ~/git |
set nocompatible | |
filetype off | |
" include vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let vundle manage vundle | |
Plugin 'gmarik/Vundle.vim' " Vundle | |
Plugin 'tmhedberg/SimpylFold' " Code Folding |
[Boolean] | |
type: boolean | |
[Integer] | |
type: integer | |
[Real] | |
type: float | |
[String] |
# get ubuntu release name | |
source /etc/lsb-release | |
# Git | |
sudo apt-get -y install git | |
sudo apt-get install -y python-software-properties software-properties-common | |
# pip | |
wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py | |
sudo python get-pip.py |
FROM ubuntu:16.04 | |
MAINTAINER Anbarasan G <[email protected]> | |
ARG username=admin | |
ARG password=admin | |
ARG port=8181 |
#!/usr/bin/env python3 | |
from argparse import ArgumentParser | |
from enum import Enum | |
from sys import argv | |
from time import sleep | |
BLOCK = [(5,5), (5,6), (6,5), (6,6)] | |
BLINKER = [(4,4), (4,5), (4,6)] |
#!/usr/bin/env python3 | |
from os import listdir | |
from os.path import dirname, exists, isfile, join | |
from pathlib import Path | |
import shutil | |
import sys | |
from PIL import ExifTags, Image, UnidentifiedImageError |
"""coursera course list sorted by duration""" | |
#!/usr/bin/env python3 | |
import csv | |
from http.server import SimpleHTTPRequestHandler | |
import json | |
from operator import itemgetter | |
from socketserver import TCPServer | |
import threading | |
from time import sleep |