Skip to content

Instantly share code, notes, and snippets.

View jdmichaud's full-sized avatar

jdmichaud

View GitHub Profile
@jdmichaud
jdmichaud / test.md
Last active August 28, 2021 10:56 — forked from ityonemo/test.md
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@jdmichaud
jdmichaud / ANSI.md
Created August 12, 2021 06:34 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@jdmichaud
jdmichaud / raytracer.rs
Last active October 22, 2018 10:23 — forked from joshmarinacci/main.rs
Simple ray tracer in Rust
#[derive(Copy,Clone,Debug)]
struct Vector {
x: f32,
y: f32,
z: f32
}
impl Vector {
fn new(x: f32,y: f32,z: f32) -> Vector {
Vector { x:x, y:y, z:z }
@jdmichaud
jdmichaud / README.md
Last active December 11, 2017 12:53 — forked from smoser/README.md
ubuntu-auto-install: install a ubuntu image with kvm

Purpose

For testing purposes, you will want to quickly spawn blank VMs with an ssh access to try out some stuff. This Gist from @smoser allows you to do just that. It:

  1. Provides a script to automatically download, install and configure an ubuntu base VM from your terminal using qemu/kvm
  2. Spawn blank and dispensable VMs from that base read-only VM

Quick start

Create the base VM