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
#!/usr/bin/env python | |
import requests | |
import argparse | |
import uuid | |
import json | |
from io import BytesIO | |
from typing import Dict | |
from datetime import datetime, timezone |
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
#!/usr/bin/env -S scala | |
// Brian Schlining. 2024-12-22 | |
//> using dep "io.circe::circe-core:0.14.10" | |
//> using dep "io.circe::circe-generic:0.14.10" | |
//> using dep "io.circe::circe-parser:0.14.10" | |
import io.circe.Decoder | |
import io.circe.generic.semiauto.deriveDecoder | |
import io.circe.parser.decode |
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
import scala.concurrent.{ExecutionContext, Future} | |
/** | |
* Poor-man's IO | |
*/ | |
type IO[A, B] = A => Either[Throwable, B] | |
type AsyncIO[A, B] = A => Future[B] | |
object IO: |
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
(* | |
WarpHere by Brian Schlining | |
2024-02-18 | |
*) | |
-- when the toolbar script icon is clicked | |
-- | |
on run | |
tell application "Finder" | |
try |
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
#!/usr/bin/env -S scala-cli shebang | |
//> using scala "3.3.0" | |
//> using dep "com.lihaoyi::requests:0.8.0" | |
//> using dep "com.lihaoyi::mainargs:0.5.0" | |
//> using dep "com.lihaoyi::upickle:3.1.0" | |
import requests.* | |
import mainargs.{main, arg, ParserForMethods, Flag} | |
import upickle.default.* | |
import java.nio.file.{Files, Paths} |
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
{ | |
"attributes" : { | |
"color" : "#b97ae5" | |
}, | |
"background" : { | |
"color" : "#1c252b" | |
}, | |
"characters" : { | |
"color" : "#7b9c55" | |
}, |
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
SELECT play_context_responses.created_at, | |
play_context_responses.updated_at, | |
play_context_responses.id, | |
play_context_responses.details, | |
play_context_responses.user_id, | |
play_context_responses.play_context_id, | |
bounding_box_specs_1.created_at AS created_at_1, | |
bounding_box_specs_1.updated_at AS updated_at_1, | |
bounding_box_specs_1.id AS id_1, | |
bounding_box_specs_1.description, |
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
# Makefile to compile and run Java sources manually | |
# because JDK 20 Valhalla support is not yet available in IntelliJ IDEA | |
JAVA_VERSION = 20 | |
JAVAC = /home/user/downloads/jdk-20-vahalla-20-75/bin/javac | |
JAVA = /home/user/downloads/jdk-20-vahalla-20-75/bin/java | |
JAVA_COMPILE_OPTIONS = --enable-preview --release $(JAVA_VERSION) | |
JAVA_OPTIONS = --enable-preview | |
JAVA_MAIN_CLASS = org.example.Database |
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
property showAlertDialog : true | |
-- get file path from CotEditor | |
tell application "CotEditor" | |
if not (exists front document) then return | |
set theFile to file of front document | |
end tell | |
-- end script if no file path is specified |
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
#!/usr/bin/env -S scala-cli shebang --scala-version 3.2.0 -J --enable-preview -J --add-modules=jdk.incubator.concurrent | |
import scala.util.Using | |
import java.util.concurrent.ScheduledThreadPoolExecutor | |
import jdk.incubator.concurrent.StructuredTaskScope | |
Thread.startVirtualThread(() => println("Hello from virtual thread")) | |
println("Hello from main thread") | |
NewerOlder