Skip to content

Instantly share code, notes, and snippets.

@stevensonmt
stevensonmt / day14_part2.ex
Created December 22, 2020 16:42
flawed Advent of Code 2020 day 14 part 2
defmodule Day14 do
use Bitwise
@moduledoc false
@input File.read!("lib/input")
def process(version \\ 1) do
@input
|> String.split("mask = ", trim: true)
|> Enum.map(fn line -> process_line(line, version) end)
@stevensonmt
stevensonmt / README.md
Created August 24, 2020 17:14 — forked from bus710/README.md
Building rust native library to be used by flutter/android

Building rust native library to be used by flutter/android

This short doc shows how to build rust to be used by flutter/android app.
Inspired by hyousef's work but added some details for the workflow.



References

Docs:

@stevensonmt
stevensonmt / gist:e2cbe95bfb4920e58adc433b4c4fa7df
Created October 10, 2019 04:10
sdl2 transparent window setting applies to all elements
fn run(font_path: &Path) -> Result<(), String> {
let sdl_context = sdl2::init()?;
let video_subsys = sdl_context.video()?;
let ttf_context = sdl2::ttf::init().map_err(|e| e.to_string())?;
let mut window = video_subsys
.window("SDL2_TTF Example", SCREEN_WIDTH, SCREEN_HEIGHT)
.position_centered()
.opengl()
.build()
ruby-prof alphametics_test.rb git--ruby-- alphametics alphametics
Run options: --seed 39907
# Running:
SSSS.SSSS
Finished in 1.130771s, 7.9592 runs/s, 0.8844 assertions/s.
9 runs, 1 assertions, 0 failures, 0 errors, 8 skips