Skip to content

Instantly share code, notes, and snippets.

Pascal Hertleif killercup

View GitHub Profile
@killercup
killercup / index.html
Created Jun 21, 2020
Some post layout scribbles
View index.html
<article>
<header>
<h1>Aliquid voluptas facilis odio</h1>
<p class="abstract">Look at this glorious layout. Beautiful side&shy;bars on wide screens: One for navi&shy;gat&shy;ing between and inside of articles; and one that render side&shy;notes (that become foot&shy;notes on narrow screens), as well as auto&shy;matically shows side&shy;notes for links (showing their titles). And let's not forget the brilliant typo&shy;graphy.</p>
<p class="meta">Written by <a href="#">Pascal Hertleif</a> on June&nbsp;20, 2020. Published in <a href="#">Typography</a>, <a href="#">Webshit</a>, and <a href="#">Code</a>.</p>
<!--<nav class="series">
<a href="#" class="pre">
<span class="label">Previous post</span>
<span class="title">Lorem ipsum secundus</span>
</a>
View .gitlab-ci.yml
stages:
- test
- postprocess
rust builder:
stage: test
image: docker:stable
variables:
CONTAINER_NAME: registry.gitlab.com/PASTE_IN_PROJECT_PATH_HERE/builder:$CI_COMMIT_REF_SLUG
before_script:
View docker-compose.yml
version: "3.2"
services:
rust:
image: rust:1.29.2 # alternatively choose one from https://hub.docker.com/u/japaric/
volumes:
- type: bind
source: './'
target: /app/code
read_only: true
- type: volume
@killercup
killercup / Makefile
Created Aug 6, 2018
pandoc slide magic
View Makefile
PANDOC ?= $(shell which pandoc)
INPUT_FOLDER ?= $(shell pwd)/src
OUTPUT_FOLDER ?= $(shell pwd)/dist
LIB_FOLDER ?= $(shell pwd)/lib
IMAGES_FOLDER ?= $(INPUT_FOLDER)/figures
REVEAL_TEMPLATE ?= $(LIB_FOLDER)/template.html
MARKDOWN_OPTIONS ?= markdown-citations
FILTER_OPTIONS ?=
# FILTER_OPTIONS ?= --filter pandoc-citeproc
View rust-versioned-serde.md

Ideas for versioned serde struct

Goals

  • version external APIs
    • read (write?) data of older versions
  • be agnostic over protocol (but we'll actually use JSON in our examples)

First draft

@killercup
killercup / playground.rs
Created May 31, 2018
Serde Cows (3 of 3)
View playground.rs
#[macro_use] extern crate serde_derive;
extern crate serde_json;
use std::borrow::Cow;
#[derive(Debug, Deserialize)]
struct Foo<'input> {
#[serde(borrow)]
bar: Cow<'input, str>,
}
@killercup
killercup / playground.rs
Created May 31, 2018
Serde Cows (2 of 3)
View playground.rs
#[macro_use] extern crate serde_derive;
extern crate serde_json;
use std::borrow::Cow;
#[derive(Debug, Deserialize)]
struct Foo<'input> {
#[serde(borrow)]
bar: Cow<'input, str>,
}
@killercup
killercup / playground.rs
Created May 31, 2018
Serde Cows (1 of 3)
View playground.rs
#[macro_use] extern crate serde_derive;
extern crate serde_json;
use std::borrow::Cow;
#[derive(Debug, Deserialize)]
struct Foo<'input> {
bar: Cow<'input, str>,
}
View run_like_fuzzer.rs
/// Add this as integration test
extern crate rsass;
pub fn fuzz_rsass_sass(data: &[u8]) {
use rsass::{OutputStyle, compile_scss};
let _ = compile_scss(data, OutputStyle::Compressed);
}
#[test]
You can’t perform that action at this time.