Skip to content

Instantly share code, notes, and snippets.

View Mattlk13's full-sized avatar

Matthew Krebs Mattlk13

  • All Your Computer Solutions
  • Belton, Mo
View GitHub Profile
@Mattlk13
Mattlk13 / effective_modern_cmake.md
Created April 26, 2020 17:17 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@Mattlk13
Mattlk13 / count.php
Created February 15, 2017 09:29 — forked from tylerhall/count.php
A quick PHP script to count the total number of words written in your Day One journal file.
<?PHP
$journal_fn = $argv[1];
$entries_dir = $journal_fn . '/entries/';
$entries = scandir($entries_dir);
print_r($entries);
$total_words = 0;
We couldn’t find that file to show.
@yaroncon
yaroncon / KafkaProducer.java
Last active November 19, 2020 06:12
Kafka producer, with Kafka-Client and Avro
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericDatumWriter;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.Encoder;
import org.apache.avro.io.EncoderFactory;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@tylerhall
tylerhall / count.php
Created April 15, 2014 21:43
A quick PHP script to count the total number of words written in your Day One journal file.
<?PHP
$journal_fn = $argv[1];
$entries_dir = $journal_fn . '/entries/';
$entries = scandir($entries_dir);
print_r($entries);
$total_words = 0;