Skip to content

Instantly share code, notes, and snippets.

Georgiana Gligor georgiana-gligor

Block or report user

Report or block georgiana-gligor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@georgiana-gligor
georgiana-gligor / most_recent.php
Last active Dec 20, 2018
preg_replace vs str_replace
View most_recent.php
<?php
$channels = array(
"UCgpy7yxv_7JbR26McdS1uQA",
"UCrHZJ6fddxeK2wwPIh5-O4Q",
"UCYUI-AaHyYslLLWAss4EiAA",
);
$res = 5;
$key = 'YOUR_KEY_HERE';
@georgiana-gligor
georgiana-gligor / check_for_null.php
Created Jan 9, 2017
Performance of null checking
View check_for_null.php
<?php
define('DEFAULT_ITERATIONS', 1000000);
$myNull = null;
$options = getopt('n:');
$iterations = isset($options['n']) ? intval($options['n']) : DEFAULT_ITERATIONS;
logLine('iterations = ' . $iterations);
@georgiana-gligor
georgiana-gligor / osx-pdf-from-markdown.markdown
Last active Oct 8, 2019
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
@startuml
actor PayRollCron
participant PayDayTransaction
participant PayRoll
participant PayRollDatabase
participant Employee
participant PayCheck
@enduml
You can’t perform that action at this time.