Skip to content

Instantly share code, notes, and snippets.

Avatar

Michiel Mulders michielmulders

View GitHub Profile
@michielmulders
michielmulders / books.json
Created Dec 24, 2020
MeiliSearch books dataset (GoodReads)
View books.json
[
{
"id": "1",
"title": "Harry Potter and the Half-Blood Prince",
"author": "J.K. Rowling/Mary GrandPré",
"cover": "hard cover with dust jacket",
"language": "eng",
"publisher": "Scholastic Inc.",
"details": {
"isbn": "0439785960",
@michielmulders
michielmulders / post.go
Created Dec 16, 2020
Post request Go web server
View post.go
package main
import (
"log"
"net/http"
"io/ioutil"
)
func postRoute(rw http.ResponseWriter, req *http.Request) {
body, err := ioutil.ReadAll(req.Body)
@michielmulders
michielmulders / books.json
Last active Dec 15, 2020
MeiliSearch GoodReads dataset
View books.json
[
{
"id": "1",
"title": "Harry Potter and the Half-Blood Prince",
"author": "J.K. Rowling/Mary GrandPré",
"cover": "hard cover with dust jacket",
"language": "eng",
"publisher": "Scholastic Inc.",
"details": {
"isbn": "0439785960",
@michielmulders
michielmulders / books.json
Created Dec 15, 2020
MeiliSearch books dataset
View books.json
[{"id":"1","title":"Harry Potter and the Half-Blood Prince","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"0439785960","rating":"4.57","pages":"652"}},{"id":"2","title":"Harry Potter and the Order of the Phoenix","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"0439358078","rating":"4.49","pages":"870"}},{"id":"4","title":"Harry Potter and the Chamber of Secrets","author":"J.K. Rowling","cover":"soft cover","language":"eng","publisher":"Scholastic","details":{"isbn":"0439554896","rating":"4.42","pages":"352"}},{"id":"5","title":"Harry Potter and the Prisoner of Azkaban","author":"J.K. Rowling/Mary GrandPré","cover":"hard cover with dust jacket","language":"eng","publisher":"Scholastic Inc.","details":{"isbn":"043965548X","rating":"4.56","pages":"435"}},{"id":"13","title":"The Ultimate Hitchhiker's Guide to the Galaxy (Hitchh
@michielmulders
michielmulders / blogs.json
Created Dec 4, 2020
MeiliSearch tutorial LogRocket: Modified blogs.json dataset
View blogs.json
[{"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 Oct 24, 2020
Log file searching and filtering example [Scalyr]
View log.txt
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 Sep 30, 2020
Metadata JSON file for NFT
View metadata.json
{
"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 Sep 30, 2020
Solidity interface for ERC721 Metadata contract
View ERC721Metadata.sol
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 Sep 23, 2020
Zola directory structure
View zola-structure.rs
.
├── config.toml
├── content
├── sass
├── static
├── templates
└── themes
@michielmulders
michielmulders / zola-youtube.html
Created Sep 23, 2020
Zola Template using YouTube shortcode
View zola-youtube.html
Here is a YouTube video:
{{ youtube(id="dQw4w9WgXcQ") }}
{{ youtube(id="dQw4w9WgXcQ", autoplay=true) }}