Skip to content

Instantly share code, notes, and snippets.

@dcunited001
dcunited001 / Materials.org
Last active April 25, 2024 20:46
RISE GnuPG Presentation

Generated cheatsheets and diagrams (or links to them)

@dcunited001
dcunited001 / julia-pluto.org
Last active May 14, 2022 05:32
invoking a julia guix service with pluto

this is what i have so far:

(use-modules (shepherd support)
             (gnu services)
             (gn services pluto))

(register-services
 (service pluto-service-type
          (pluto-configuration
CodeSign /Users/dc/Library/Developer/Xcode/DerivedData/Spectra-ckpkeetuqwsnrdgnygasozpgbkic/Build/Products/Debug/Spectra-OSXExample.app
cd /Users/dc/dev/apple/Spectra/Spectra-OSX
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp=none /Users/dc/Library/Developer/Xcode/DerivedData/Spectra-ckpkeetuqwsnrdgnygasozpgbkic/Build/Products/Debug/Spectra-OSXExample.app
/Users/dc/Library/Developer/Xcode/DerivedData/Spectra-ckpkeetuqwsnrdgnygasozpgbkic/Build/Products/Debug/Spectra-OSXExample.app: code object is not signed at all
In subcomponent: /Users/dc/Library/Developer/Xcode/DerivedData/Spectra-ckpkeetuqwsnrdgnygasozpgbkic/Build/Products/Debug/Spectra-OSXExample.app/Contents/PlugIns/SpectraOSXSpec.xctest
// i have a protocol
protocol Proto {
var aVar: String
typealias Alias // and it has a type alias
}
enum TypesOfProtos {
case FooTag = "foo-tag"
case BarTag = "bar-tag"
@dcunited001
dcunited001 / ParserNode.swift
Created March 10, 2016 22:00
Swift protocol questions
import Foundation
import Fuzi
import Swinject
// option one
// - fails because of "Self or associated type errors"
public protocol ParserNode {
typealias GenerateType
@dcunited001
dcunited001 / ModelIOTextureGenerators.swift
Created March 8, 2016 22:46
xcode never finishes compiling when using a class name as a function argument
// See Below in NoiseTextureGenerator
//
// xcode never finishes compiling?!
// - this file is part of Spectra at the following commit:
// - https://github.com/dcunited001/SpectraNu/commit/283e3ba242fbf802d8f82537a57c86b2b8a393be
//
// ModelIOTextureGenerators.swift
//
@dcunited001
dcunited001 / transmute-mesh.swift
Last active February 23, 2016 03:24
Swift(Spectra) - Transmuting geometry of meshes/submeshes to fill in attributes or add
import ModelIO // because it's pretty awesome
import Metal // because why wouldn't you want the most streamlined hardware, if that's the name of the game
var mesh = BlackBufferMagic(vertices: [
1,0,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1]).itGivesMeAMesh()
var meshTransmuteList = mesh.attributes.map { (attr) in
@dcunited001
dcunited001 / pointers.swift
Last active February 22, 2016 13:48
pointers example in swift
// it's been a minute, so this probably doesn't run
class Foo
var mvpPointer: UnsafeMutablePointer<Void>? { get set }
}
let f = Foo()
let barz = [0 1 2 3]
memcpy(mvpPointer!, &barz, barz.count)
@dcunited001
dcunited001 / io.xkb
Created December 22, 2015 11:24
Xkb digimon layout with unicode & emoji for linux mint
// check out my keyboard dotfiles for info
// - https://github.com/dcunited001/dc.files.kbd/tree/master/xkeyboard
partial alphanumeric_keys
xkb_symbols "basic" {
include "us"
name[Group1]= "Digimon - US";
// shift + space = underscore