Skip to content

Instantly share code, notes, and snippets.

View jasper-lyons's full-sized avatar
💭
Full time educator, part time developer

Jasper Lyons jasper-lyons

💭
Full time educator, part time developer
View GitHub Profile
@jasper-lyons
jasper-lyons / solr-query-generator.rb
Created March 25, 2020 12:36
A rough implementation of a ruby interface to generate solr queries using ruby code.
module Search
@@searchable_attributes = []
def searchable(&block)
block.call(@@searchable_attributes)
end
def searchable_attributes
@@searchable_attributes
end
function useTable([]) {
const [id, setId] = useState(0)
const [records, setRecords] = useState([])
function find(attrs) {
return records.filter(
record => Object
.entries(attrs)
.every(([key, value]) => record[key] === value)
)
@jasper-lyons
jasper-lyons / main.swift
Created November 14, 2021 14:27
Smallest Valid SwiftUI Program - Works without loading the XCode UI (Still needs to be installed)
import SwiftUI
struct app: App {
var body: some Scene {
WindowGroup {
Text("Hello").padding()
}
}
}