Skip to content

Instantly share code, notes, and snippets.

Slow Distillation ⚗️💭

elfenlaid elfenlaid

Slow Distillation ⚗️💭
View GitHub Profile
elfenlaid / issues.json
Last active Jun 10, 2021
Good First Issue Repositories
View issues.json
"difficulty: easy",
"difficulty: moderate",
"difficulty: medium",
"difficulty: just a custom template away! easiest way to contribute!",
"difficulty: beginner",
"difficulty: intermediate",
"easy contribution",
elfenlaid / logs.swift
Created May 21, 2021
Custom Swift String Interpolation: Logs Privacy
View logs.swift
struct Message {
enum Privacy {
case `public`
case `private`
var value: String
extension Message: CustomStringConvertible {
View organization-variables.json
"owner": "SwiftPackageIndex",
"name": "SwiftPackageIndex-Server"
elfenlaid /
Created Apr 16, 2021
Fish $PATH environment variable manager

Fish $PATH environment variable manager


Store file at ~/.config/fish/functions/ path


$ path --help
View migrate_and_rollback_test.ex
defmodule EctoMigrationTest do
use ExUnit.Case
def rollback, do: Mix.Shell.IO.cmd("MIX_ENV=test mix ecto.rollback --all")
def migrate, do: Mix.Shell.IO.cmd("MIX_ENV=test mix ecto.migrate")
test "test rollback and migration" do
assert 0 == rollback()
assert 0 == migrate()
elfenlaid / CoreFoundation+PointerArguments.swift
Last active Jan 6, 2021
Calling Core Foundation functions with pointer arguments
View CoreFoundation+PointerArguments.swift
let pixelBufferPool: CVPixelBufferPool = // ...
unsafe_pointer: do {
let pixelBufferPointer = UnsafeMutablePointer<CVPixelBuffer?>.allocate(capacity: 1)
defer {
pixelBufferPointer.deinitialize(count: 1)
View linguistic_tagger.swift
import Foundation
let stmt: NSString = "Actionable emptiness"
let options: NSLinguisticTagger.Options = [.omitWhitespace, .omitPunctuation, .omitOther]
let stringRange = NSMakeRange(0, stmt.length)
let languageMap = ["Latn":["en"]]
stmt.enumerateLinguisticTags(in: stringRange, scheme: NSLinguisticTagScheme.lemma, options: options, orthography: nil) { tag, _, _, _ in
View boilerplate.swift
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI {
VStack {
Text("Hello, World")