Skip to content

Instantly share code, notes, and snippets.

@Darkle
Darkle / json.md
Last active June 3, 2024 11:40
Download generated text as a file with violentmonkey/greasemonkey
#!/usr/bin/env -S dotnet fsi
#r "nuget: FsHttp, 14.5.0"
#r "nuget: FSharp.Json, 0.4.1"
#r "nuget: Serilog, 3.1.1"
open System
open System.Net.Http.Headers
open System.Net
open FsHttp
let generateOpenApiClient () =
let openApiClientFileStr =
$"""
(**
⚠️ ⚠️ IMPORTANT! This file is auto-generated. You should _NOT_ edit this file by hand
as any changes you make will be overwritten!
**)
module OpenApiClient
open SwaggerProvider
@Darkle
Darkle / gist:a84a9a126ac6bd3eff635355ac54548f
Created January 1, 2023 03:53 — forked from koakh/gist:fbbc37cde630bedcf57acfd4d6a6956b
SurrealDB : How to use signin and signup (server + client nodesjs)

As a developer you have complete control over the signup and signin functionality...

$ surreal sql --conn http://localhost:8000 --user root --pass root --ns test --db test
-- optional : this is the default see --ns test --db test start server flags
-- USE NS test DB test;
@Darkle
Darkle / index.html
Created December 3, 2022 11:14 — forked from AngelMunoz/index.html
Implement SSE with F# and Saturn
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
@Darkle
Darkle / 1. How To Do Things In F#.md
Last active June 28, 2024 02:42
How To Do Things In F#
@Darkle
Darkle / neovim.desktop
Last active July 29, 2022 12:49
neovim .desktop with icon
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Version=1.0
Name=NeoVim
Comment=Text Editor and IDE
Exec=gnome-terminal --hide-menubar --title="NeoVim" --tab-with-profile="NeoVim" -- /path-to/nvim %F
Icon=/path-to/Icons/vim.png
Terminal=false
Categories=GTK;Development;IDE;TextEditor;
@Darkle
Darkle / .js
Created December 12, 2021 06:35
'(bestvideo[ext=webm][height<=?480]+bestaudio[ext=webm])[filesize<=?300M]/(bestvideo[ext=webm][height<=?480]+bestaudio[ext=ogg])[filesize<=?300M]/(bestvideo[ext=webm][height<=?480]+bestaudio[ext=opus])[filesize<=?300M]/(bestvideo[ext=mp4][height<=?480]+bestaudio[ext=mp4])[filesize<=?300M]/(bestvideo[ext=mp4][height<=?480]+bestaudio[ext=m4a])[filesize<=?300M]/(bestvideo[ext=mp4][height<=?480]+bestaudio[ext=mp3])[filesize<=?300M]/(bestvideo[ext=mp4][height<=?480]+bestaudio[ext=aac])[filesize<=?300M]/(bestvideo[ext=mp4][height<=?480]+bestaudio[ext=ogg])[filesize<=?300M]/(bestvideo[ext=mp4][height<=?480]+bestaudio[ext=opus])[filesize<=?300M]/(bestvideo[ext=ogg][height<=?480]+bestaudio[ext=ogg])[filesize<=?300M]/(bestvideo[ext=ogg][height<=?480]+bestaudio[ext=opus])[filesize<=?300M]/(worstaudio+worstvideo/worst)[filesize<=?300M]'
"build:minify": "minify --recursive --output dist dist",
"build:vendor-size-check": "chalk blue bold 'Vendor Libs Size Check:\n\n' && bundlesize -f \"dist/js/web_modules/**/*.js\" -s 35kB",
"build:total-size-check": "ncat 'dist/**/*.js' -o ./total-bundle.js > /dev/null && chalk blue bold 'Total JS Size Check:\n\n' && bundlesize -f ./total-bundle.js -s 70kB && trash ./total-bundle.js",
@Darkle
Darkle / .js
Created March 9, 2020 00:08
Things that are broken in lightscripts syntax highlighting
pathname.match(/\//gu).length === 1