Skip to content

Instantly share code, notes, and snippets.

@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
Name Area Stablity Since version
abi_sysv64 lang unstable 1.13.0
abi_vectorcall lang unstable 1.7.0
addr_parse_error_error lib stable 1.4.0
advanced_slice_patterns lang unstable 1.0.0
alloc lib unstable None
alloc_jemalloc lib unstable None
alloc_system lib unstable None
allocator lang unstable 1.0.0
@killercup
killercup / Readme.md
Last active August 26, 2023 23:14
Convert The Rust Programming Language to Epub
@killercup
killercup / Makefile
Created August 6, 2018 14:00
pandoc slide magic
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
@killercup
killercup / playground.rs
Created July 27, 2022 13:02
Rebuilding Bevy ECS -- queries
#![allow(dead_code)]
// ------------------
// The game code
// ------------------
fn main() {
let mut app = App::new()
.add_system(example_system)
.add_system(another_example_system)
@killercup
killercup / playground.rs
Last active July 24, 2022 21:17
Rebuilding Bevy system functions
#![allow(dead_code)]
// ------------------
// The game code
// ------------------
fn main() {
App::new()
.add_system(example_system)
.add_system(another_example_system)
@killercup
killercup / playground.rs
Last active July 24, 2022 19:57
(step 1 from post) Rebuilding Bevy system functions
// ------------------
// The game code
// ------------------
fn main() {
App::new().add_system(example_system).run();
}
fn example_system() {
println!("foo");
@killercup
killercup / config.fish
Last active April 12, 2022 03:43
Server Config with fish, vim an tmux
# ~/.config/fish/config.fish
. ~/.config/fish/fish_prompt.fish
set fish_greeting '' # turn off greeting
function fish_title;end
alias vi 'vim'
@killercup
killercup / mongoose-csv-stream-export.js
Created January 21, 2014 10:58
Stream data from Mongoose into CSV download
var Campaign = require('../model/campaign');
module.exports.getCampaignsCSV = function (req, res) {
function CSVEscape(field) {
return '"' + String(field || "").replace(/\"/g, '""') + '"';
}
var headers = [
'Code-Nummer', //num
'Kampagnenname', //name
@killercup
killercup / api.js
Last active June 10, 2021 22:02
Streamed CSV Export using node-restify and mongoose
/**
* # Some Demo API Service
*/
var restify = require('restify');
var map = require('map-stream');
var csvify = require('../helpers/csvify');
var Team = require("../models").Team;