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
local M = { | |
config = { | |
root_dir = "01 Periodic notes", | |
extension = ".md", | |
day = { | |
subdirectory = "daily", | |
to_string = function(now) | |
return os.date("%Y-%m-%d", now) | |
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
vim.api.nvim_create_user_command("SendToPandoc", function(opts) | |
local start = (opts.line1 or 1) - 1 | |
local last = opts.line2 or -1 | |
local lines = vim.api.nvim_buf_get_lines(0, start, last, false) | |
local out = vim.system({"pandoc", "--columns=120", "-t", "gfm"}, {stdin=lines, text=true}):wait() | |
assert(out.code == 0, "An error occured "..(out.stderr or "")) | |
-- Remove extra pandoc markings | |
local cleaned = string.gsub(out.stdout, "\\%[", "[") |
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
local M = { | |
root_dir = "01 Periodic notes", | |
suffix = { | |
day = "daily", | |
week = "weekly", | |
month = "monthly", | |
}, | |
} | |
M.get_file_names = function() |
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
local M = { | |
ns = vim.api.nvim_create_namespace("WindowDimmer"), | |
augrp_name = "WindowDimmerAuGroup", | |
hl_group = "Twilight", -- NOTE This supposes the `Twilight" group exists! | |
enabled = false, | |
enabled_buf = nil, | |
} | |
M.enable = function() | |
if not M.enabled then |
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
local M = { | |
buf_nr = nil, | |
suites = {}, | |
window_title = "Results: ", | |
buffer_namespace = { name = "ResultWindowNS", id = nil }, | |
} | |
M.clear_internal_buffer = function() | |
if M.buf_nr ~= nil and vim.fn.bufexists(M.buf_nr) then | |
vim.api.nvim_buf_delete(M.buf_nr, { force = true }) |
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
const size_t count = 6; | |
const uint8_t pins[count] = {A0, A1, A2, A3, A4, A5}; | |
size_t i; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
for (i = 0; i < count; i++) |
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
-- Channels | |
INPUT_CHANNELS = {0, 1} -- Left and right audio input | |
SPEED_CHANNELS = {2, 3} -- Left and right speed change triggers | |
FLIP_CHANNELS = {4, 5} -- Left and right direction flip triggers | |
SKIP_CHANNELS = {6, 7} -- Left and right position skip triggers | |
OUTPUT_CHANNELS = {0, 1} -- Left and right audio outputs | |
-- Constants | |
DURATION = 8 -- Audio buffer duration in seconds | |
SPEEDS = {0.5, 0.6703, 1, 1.49831} -- Possible play head speed |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Test allocation</title> | |
</head> | |
<body> |
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
using System; | |
using System.Text; | |
namespace Test | |
{ | |
class Program | |
{ | |
public static readonly Random Rand = new Random(); | |
public static readonly UTF8Encoding Encoding = new UTF8Encoding(); | |
public static readonly int DataLength = ushort.MaxValue; |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
NewerOlder