This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Math(el) | |
if el.mathtype == "InlineMath" then | |
if el.text:sub(1,1) == '`' and el.text:sub(#el.text) == '`' then | |
local text = el.text:sub(2,#el.text-1) | |
return pandoc.Math(el.mathtype, text) | |
else | |
local cont = pandoc.read(el.text) | |
return { pandoc.Str("$") } .. cont.blocks[1].content .. { pandoc.Str("$") } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note: uses C++17 fs features; build with | |
// g++ -std=c++17 event-reader.cpp -lstdc++fs | |
// | |
// Licensed under the following terms: | |
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
// Version 2, December 2004 | |
// | |
// Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
// | |
// Everyone is permitted to copy and distribute verbatim or modified |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Functor<T> { | |
map<U>(f: (x: T) => U): Functor<U> | |
} | |
class Box<T> implements Functor<T> { | |
value: T | |
constructor(x: T) { | |
this.value = x | |
} | |
map<U>(f: (x: T) => U): Box<U> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Text.Pandoc.JSON | |
import System.Directory | |
import System.FilePath ((</>)) | |
import qualified Data.Hash.MD5 as MD5 | |
import qualified Data.Text as T | |
import System.IO.Temp | |
import System.Process | |
import Control.Monad (unless) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ts-node | |
const path = require('path') | |
const fs = require('fs') | |
if (!process.argv[2]) { | |
process.stderr.write(`Usage: ${process.argv[1]} <filename>\n`) | |
return -1 | |
} | |
const filePath = path.join(process.cwd(), process.argv[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import tempfile | |
import sys | |
import subprocess | |
import os | |
import errno | |
# Make temp. file for input | |
inp = tempfile.NamedTemporaryFile(suffix='.mdk',mode='wb',dir=os.getcwd()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S deno run --allow-net=api.nasa.gov,apod.nasa.gov --allow-env --allow-write=${HOME}/.apodwallpaper --allow-run | |
// Filename: apod.ts | |
// Purposes: Downloads NASA Astronomy Picture of the Day and displays it as the background using feh | |
// Author(s): Nikolay "Lierdakil" Yakimov https://github.com/lierdakil | |
// !!! Replace this with your NASA API key; go to https://api.nasa.gov/ to get one | |
const api_key = 'DEMO_KEY' | |
// Read home variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <boost/dynamic_bitset/dynamic_bitset.hpp> | |
#include <future> | |
#include <iomanip> | |
#include <iostream> | |
#include <stdexcept> | |
#include <utility> | |
#include <vector> | |
enum class St { Empty, Occupied }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clang | |
-I/usr/include/libusb-1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
NewerOlder