Skip to content

Instantly share code, notes, and snippets.


Georgiana Gligor georgiana-gligor

View GitHub Profile
georgiana-gligor / most_recent.php
Last active Dec 20, 2018
preg_replace vs str_replace
View most_recent.php
$channels = array(
$res = 5;
$key = 'YOUR_KEY_HERE';
georgiana-gligor / check_for_null.php
Created Jan 9, 2017
Performance of null checking
View check_for_null.php
define('DEFAULT_ITERATIONS', 1000000);
$myNull = null;
$options = getopt('n:');
$iterations = isset($options['n']) ? intval($options['n']) : DEFAULT_ITERATIONS;
logLine('iterations = ' . $iterations);
georgiana-gligor / osx-pdf-from-markdown.markdown
Last active Jan 27, 2021
Markdown source for the "Create PDF files from Markdown sources in OSX" article
View osx-pdf-from-markdown.markdown

Create PDF files from Markdown sources in OSX

When [Markdown][markdown] appeared more than 10 years ago, it aimed to make it easier to express ideas in an easy-to-write plain text format. It offers a simple syntax that takes the writer focus away from the formatting, thus giving her time to focus on the actual content.

The market abunds of editors to be used for help with markdown. After a few attempts, I settled to Sublime and its browser preview plugin, which work great for me and have a small memory footprint to accomplish that. To pass the results around to other people, less technical, a markdown file and a bunch of images is not the best approach, so converting it to a more robust format like PDF seems like a much better choice.

[Pandoc][pandoc] is the swiss-army knife of converting documents between various formats. While being able to deal with heavy-weight formats like docx and epub, we will need it for the more lightweight markdown. To be able to generate PDF files, we need LaTeX. On OSX, the s

View demo-01-participants.puml
actor PayRollCron
participant PayDayTransaction
participant PayRoll
participant PayRollDatabase
participant Employee
participant PayCheck