Skip to content

Instantly share code, notes, and snippets.

View iwillspeak's full-sized avatar
🚲
The status is always bike

Will Speak iwillspeak

🚲
The status is always bike
View GitHub Profile
type Kind =
| Number
| Literal
| Binary
let chooseLeft = function
| Choice1Of2 x -> Some x
| _ -> None
let chooseRight = function
<Project Sdk="Feersum.Sdk/0.2.1">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="hello.scm" />
</ItemGroup>
@iwillspeak
iwillspeak / env_export.sh
Last active August 6, 2021 10:43
Shows how to export .env data to the current environment
#! /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 August 19, 2021 07:39
Example Cake Script for Tyrannoport
bin/
obj/
TestReports/
tools/
/.config/
@iwillspeak
iwillspeak / eratosthenes.scm
Created September 4, 2020 20:53
Sieve of Eratosthenes in Scheme
;; 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 August 20, 2020 07:58
.NET NU5104 NoWarn Build Errors
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 08:22
Simple Elm Counter
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 February 10, 2018 08:56
Demonstration of caching of derived type information using the curiously recurring template pattern
root = true
[*.cs]
indent_style = space
indent_size = 4
@iwillspeak
iwillspeak / .gitignore
Created January 17, 2018 07:15
Debugging Windows Build Failure
/target/
**/*.rs.bk
@iwillspeak
iwillspeak / keybase.md
Created August 5, 2017 16:36
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: