Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Speak iwillspeak

View GitHub Profile
@iwillspeak
iwillspeak / env_export.sh
Last active Aug 6, 2021
Shows how to export .env data to the current environment
View env_export.sh
#! /usr/bin/env bash
# this sub-shell constrains the scope of the injected variables
(
export $(xargs <<EOF
Foo=hello
Bar=world
EOF
)
@iwillspeak
iwillspeak / .gitignore
Last active Aug 19, 2021
Example Cake Script for Tyrannoport
View .gitignore
bin/
obj/
TestReports/
tools/
/.config/
@iwillspeak
iwillspeak / eratosthenes.scm
Created Sep 4, 2020
Sieve of Eratosthenes in Scheme
View eratosthenes.scm
;; Implementation of the Sieve of Eratosthenes
;; https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
(define (eratosthenes n)
;; Mark multiples of the given prime in the vector
(define (mark-multiples p marked)
(define (mark-multiples-at p m marked)
(if (>= m (vector-length marked))
marked
(begin
(vector-set! marked m #t)
@iwillspeak
iwillspeak / Class1.cs
Last active Aug 20, 2020
.NET NU5104 NoWarn Build Errors
View Class1.cs
using System;
namespace bugz
{
public class Class1
{
// This package used to be packable with the .NET Core 3.1.301 SDK but
// packaging fails with the .NET Core 3.1.401 SDK. The exit code from
// `dotnet pack` is now 1 indicating failure. This has prevented
// release builds of some of our libraries.
@iwillspeak
iwillspeak / Counter.elm
Created May 2, 2018
Simple Elm Counter
View Counter.elm
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
main = Html.beginnerProgram { model = model, view = view, update = update }
--- MODEL
type alias Model = Int
@iwillspeak
iwillspeak / .editorconfig
Last active Feb 10, 2018
Demonstration of caching of derived type information using the curiously recurring template pattern
View .editorconfig
root = true
[*.cs]
indent_style = space
indent_size = 4
@iwillspeak
iwillspeak / .gitignore
Created Jan 17, 2018
Debugging Windows Build Failure
View .gitignore
/target/
**/*.rs.bk
View keybase.md

Keybase proof

I hereby claim:

  • I am iwillspeak on github.
  • I am willspeak (https://keybase.io/willspeak) on keybase.
  • I have a public key whose fingerprint is 4167 B68D 09F3 B9DF B740 229E FDF5 9F16 C78F 372E

To claim this, I am signing this object:

@iwillspeak
iwillspeak / Cargo.toml
Created Jul 11, 2017
Microcrate for Onig Link Error on Windows
View Cargo.toml
[package]
name = "oni"
version = "0.1.0"
authors = ["Ian Pickering <ipickering2@gmail.com>"]
[dependencies]
onig = "1.4"
[[bin]]
name = "oni"
View Cargo.toml
[package]
name = "yop"
version = "0.1.0"
authors = ["Will Speak <lithiumflame@gmail.com>"]
[dependencies]
[[bin]]
name = "yop"
path = "yop.rs"