Skip to content

Instantly share code, notes, and snippets.

View michielmulders's full-sized avatar

Michiel Mulders michielmulders

View GitHub Profile
@michielmulders
michielmulders / blogs.json
Created December 4, 2020 18:20
MeiliSearch tutorial LogRocket: Modified blogs.json dataset
[{"id":"0","source_name":"Reuters","author":"Reuters Editorial","title":"NTSB says Autopilot engaged in 2018 California Tesla crash","description":"The National Transportation Safety Board said Tuesday a Tesla Model S was in Autopilot mode when it struck a fire truck in Culver City, California -- one of a series of crashes the board is investigating involving Tesla's driver assistance system.","url":"https://www.reuters.com/article/us-tesla-crash-idUSKCN1VO22E","image":"https://s4.reutersmedia.net/resources/r/?m=02&d=20190903&t=2&i=1425817142&w=1200&r=LYNXNPEF821HS","published":"2019-09-03T16:22:20Z","publication_year":2019,"content":"WASHINGTON (Reuters) - The National Transportation Safety Board said Tuesday a Tesla Model S was in Autopilot mode when it struck a fire truck in Culver City, California one of a series of crashes the board is investigating involving Tesla’s driver assistance… [+478 chars]"},{"id":"1","source_name":"The Irish Times","author":"Eoin Burke-Kennedy","title":"Unemployment falls to po
@michielmulders
michielmulders / log.txt
Last active October 24, 2020 20:33
Log file searching and filtering example [Scalyr]
2015-12-03 17:08:36 DEBUG SEARCHQUEUE-DAILY-SEARCH :: [User1] :: Attempting to add item to cache: Jimmy.Fallon.2015.12.02.Brett.Favre.720p.HDTV.x264-CROOKS[rartv]
2015-12-03 17:08:36 DEBUG SEARCHQUEUE-DAILY-SEARCH :: [User1] :: Unable to parse the filename Jimmy.Fallon.2015.12.02.Brett.Favre.720p.HDTV.x264-CROOKS[rartv] into a valid show
2015-12-03 17:08:36 DEBUG SEARCHQUEUE-DAILY-SEARCH :: [User1] :: Attempting to add item to cache: Moonbeam.City.S01E09.The.Legend.of.Circuit.Lake.720p.CC.WEBRip.AAC2.0.x264-BTW[rartv]
2015-12-03 17:08:38 DEBUG SEARCHQUEUE-WEEKLY-MOVIE :: [User1] :: Unable to parse the filename Moonbeam.City.S01E09.The.Legend.of.Circuit.Lake.720p.CC.WEBRip.AAC2.0.x264-BTW[rartv] into a valid show
2015-12-03 17:08:51 ERROR SEARCHQUEUE-DAILY-SEARCH :: [User1] :: Failed to find item in cache: Black-ish.S02E09.Man.At.Work.720p.EXTENDED.HULU.WEBRip.AAC2.0.H264-NTb[rartv]
2015-12-03 17:08:51 FATAL SEARCHQUEUE-DAILY-SEARCH :: [User1] :: Search service crashed lost connection: ERRORS.PUBKEYERR.service
@michielmulders
michielmulders / metadata.json
Created September 30, 2020 16:12
Metadata JSON file for NFT
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents"
},
"description": {
"type": "string",
@michielmulders
michielmulders / ERC721Metadata.sol
Created September 30, 2020 16:12
Solidity interface for ERC721 Metadata contract
interface ERC721Metadata {
/// @notice A descriptive name for a collection of NFTs in this contract
function name() external view returns (string _name);
/// @notice An abbreviated name for NFTs in this contract
function symbol() external view returns (string _symbol);
/// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
/// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC
/// 3986. The URI may point to a JSON file that conforms to the "ERC721
@michielmulders
michielmulders / zola-structure.rs
Created September 23, 2020 16:01
Zola directory structure
.
├── config.toml
├── content
├── sass
├── static
├── templates
└── themes
@michielmulders
michielmulders / zola-youtube.html
Created September 23, 2020 16:00
Zola Template using YouTube shortcode
Here is a YouTube video:
{{ youtube(id="dQw4w9WgXcQ") }}
{{ youtube(id="dQw4w9WgXcQ", autoplay=true) }}
@michielmulders
michielmulders / zola.html
Created September 23, 2020 15:57
Zola YouTube shortcode
<div {% if class %}class="{{class}}"{% endif %}>
<iframe
src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}"
webkitallowfullscreen
mozallowfullscreen
allowfullscreen>
</iframe>
</div>
@michielmulders
michielmulders / plugin.rs
Created September 23, 2020 15:38
Enable plugin for mdBook
$ cargo install mdbook-linkcheck
$ edit book.toml && cat book.toml
[book]
title = "My Awesome Book"
authors = ["Michael-F-Bryan"]
[output.html]
[output.linkcheck] # enable the "mdbook-linkcheck" renderer
@michielmulders
michielmulders / mdBook.rs
Created September 23, 2020 15:31
mdBook project structure
project-name/
├── book
└── src
├── chapter_1.md
└── SUMMARY.md
@michielmulders
michielmulders / dogs.liquid
Created September 23, 2020 15:17
Dogs template
<ul>
{% for breed in site.data.dogs %}
<li>{{ breed.name }}</li>
{% endfor %}
</ul>