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
You're taking your first steps into Ruby
A good introduction to programming in general. Easy on newer programmers.
| /** | |
| * Definition for a binary tree node. | |
| * function TreeNode(val) { | |
| * this.val = val; | |
| * this.left = this.right = null; | |
| * } | |
| */ | |
| /** | |
| * @param {TreeNode} root | |
| * @param {number} key |
This guide is adapted from http://reboot.pro/topic/14547-linux-load-your-root-partition-to-ram-and-boot-it/
What you need:
| # Set pid of nginx master process here | |
| pid=8192 | |
| # generate gdb commands from the process's memory mappings using awk | |
| cat /proc/$pid/maps | awk '$6 !~ "^/" {split ($1,addrs,"-"); print "dump memory mem_" addrs[1] " 0x" addrs[1] " 0x" addrs[2] ;}END{print "quit"}' > gdb-commands | |
| # use gdb with the -x option to dump these memory regions to mem_* files | |
| gdb -p $pid -x gdb-commands | |
| # look for some (any) nginx.conf text |
| require 'benchmark/ips' | |
| Benchmark.ips do |x| | |
| Property = Struct.new(:name, :original_name) | |
| PROPERTIES = [ | |
| Property.new("Clo", "Chloe" ), | |
| Property.new("Jon", "Jonathan" ), | |
| Property.new("Kris", "Kristin" ), |
| require 'yaml' | |
| $db_file = 'filename.yaml' | |
| def load_data | |
| text = File.read 'db.yaml' | |
| return YAML.load text | |
| end | |
| def store_data hash |