Skip to content

Instantly share code, notes, and snippets.

View vascorsd's full-sized avatar
😒
existing...

Vasco vascorsd

😒
existing...
View GitHub Profile
@vascorsd
vascorsd / proof.md
Created February 22, 2024 09:22
Keyoxide ASP proof

$argon2id$v=19$m=8192,t=2,p=4$ThTfafYKtR24+CF1JiB8pQ$llqK8dVm0Xv4UtHG+KOMsmmpzDsUtsnq

@vascorsd
vascorsd / hi.scala
Last active February 20, 2024 10:25
Scala GUI using QT on linux / archlinux
//> using scala 3.3.1
//> using platform jvm
// docs say that QtJambi runs on jvm 8 or later. My system has jvm 21 installed.
//> using jvm system
// --- QT6 | UI toolkit configuration on linux / archlinux
//> using dep io.qtjambi:qtjambi:6.6.1
//> using dep io.qtjambi:qtjambi-native-linux-x64:6.6.1
@vascorsd
vascorsd / server.py
Last active July 19, 2017 03:07
TimeZone from Geo in Python 3
#!/bin/python3
from timezonefinder import TimezoneFinder
from http.server import BaseHTTPRequestHandler,HTTPServer
import json
tf = TimezoneFinder()
class Handlers(BaseHTTPRequestHandler):
def do_GET(self):
@vascorsd
vascorsd / SeqOrListsMatching.scala
Created August 19, 2016 16:50
Trying a bunch of different matches and patterns on Lists.
val emptySeq1 = Seq.empty[String]
val emptySeq2 = Seq[String]()
val someSeq1 = Seq("one")
val someSeq2 = Seq("one", "two")
// good matches a list with something, no matter the size, works by making sure the strictly empty
// is matched FIRST
def test1(s: Seq[String]) = s match {
case errs @ Seq() => "got empty"
@vascorsd
vascorsd / TreeNodesCheck.scala
Created August 19, 2016 16:48
Some tests around checking relationship of some Nodes. Includes Typeclass :D
case class Node(id: Long, parent: Option[Long])
trait TreeNode[T] {
def id(n: T): Long
def parentId(n: T): Option[Long]
}
object TreeNode {
def apply[A](implicit A: TreeNode[A]): TreeNode[A] = A