π’
This file contains hidden or 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 server = true -- Change to false for the client | |
local connectionId | |
local pollGroup | |
Steam = require "luasteam" | |
Steam.init() | |
-- We call this to let Steam know that we want to use the networking sockets API. | |
-- Which probably won't do much in this example, but it can save you a delay. |
This file contains hidden or 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
---Utility for keymap creation. | |
---@param lhs string | |
---@param rhs string|function | |
---@param opts string|table | |
---@param mode? string|string[] | |
local function keymap(lhs, rhs, opts, mode) | |
opts = type(opts) == 'string' and { desc = opts } | |
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr }) | |
mode = mode or 'n' | |
vim.keymap.set(mode, lhs, rhs, opts) |
This file contains hidden or 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
open Donald | |
open System.Data.Common | |
open System.Data.SQLite | |
open System.Threading.Tasks | |
open Giraffe | |
open Giraffe.ViewEngine | |
open FsToolkit.ErrorHandling | |
open Microsoft.AspNetCore.Builder | |
[<RequireQualifiedAccess>] |
This file contains hidden or 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 xxd_dump_cmd = 'xxd -g 1 -u' | |
local xxd_cur_pos = nil | |
local function is_binary_file() | |
local filename = vim.fn.expand('%:t') | |
-- local basename = string.match(filename, "^[a-z]*$") | |
local binary_ext = { 'png', 'jpg', 'jpeg', 'out' } | |
local ext = string.match(filename, "%.([^%.]+)$") | |
if ext == nil and string.match(filename, '[a-z]+') then return true end |
This file contains hidden or 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
M.autolist = function() | |
local preceding_line = vim.fn.getline(vim.fn.line(".") - 1) | |
if preceding_line:match("^%s*%d+%.%s.") then | |
local list_index = preceding_line:match("%d+") | |
print(list_index .. "t") | |
vim.fn.setline(".", preceding_line:match("^%s*") .. list_index + 1 .. ". ") | |
vim.cmd([[execute "normal \<esc>A\<space>"]]) | |
elseif preceding_line:match("^%s*%d+%.%s$") then | |
vim.fn.setline(vim.fn.line(".") - 1, "") | |
elseif preceding_line:match("^%s*[-+*]") and #preceding_line:match("[-+*].*") == 1 then |
This file contains hidden or 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
#r "nuget:FParsec" | |
open FParsec | |
type AttackVector = | |
| Network | |
| AdjacentNetwork | |
| Local | |
| Physical |
This file contains hidden or 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
namespace Domain | |
open System | |
open System.Runtime.CompilerServices | |
open System.Globalization | |
[<AutoOpen>] | |
module rec Money = | |
[<Struct;IsReadOnly>] | |
type Money = private Money of decimal * Currency with |
This file contains hidden or 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
#r "nuget: JavaScriptEngineSwitcher.ChakraCore.Native.win-x64" | |
#r "nuget: JavaScriptEngineSwitcher.ChakraCore, 3.18.2" | |
#r "nuget: DartSassHost, 1.0.0-preview7" | |
#r "nuget: FSharp.Control.Reactive, 5.0.5" | |
open System | |
open System.IO | |
open DartSassHost | |
open DartSassHost.Helpers | |
open JavaScriptEngineSwitcher.ChakraCore |
This file contains hidden or 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
:root { | |
box-sizing: border-box; | |
} | |
*, ::before, ::after { | |
box-sizing: inherit; | |
} | |
html { | |
scroll-behavior: smooth; | |
} |
NewerOlder