This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'tempfile' | |
require 'fileutils' | |
# Signals | |
trap("SIGINT") { exit } | |
# Setup | |
TARGET_FOLDER = ARGV[0] | |
TARGET_URL = ARGV[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
alias latex='/usr/bin/latex' | |
alias dvipng='/usr/bin/dvipng' | |
alias convert='/usr/bin/convert' | |
#choose a number from 75-300 | |
density=300 | |
if [ $# != 2 ] | |
then | |
echo "Usage: $0 output_file latex_code" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# ruby latex_server.rb | |
# | |
# Try: <img src="http://localhost:4567/\cos \frac{\pi}{2} = 0"> | |
# Get: A nice looking png of: cos(pi/2) = 0 | |
# | |
# Bug1: Ellipses (...) don't work. Probably the way urls are parsed | |
# b |