Skip to content

Instantly share code, notes, and snippets.

View iocat's full-sized avatar
:octocat:
😊

Thanh Ngo iocat

:octocat:
😊
  • CA
View GitHub Profile
@ityonemo
ityonemo / test.md
Last active January 13, 2026 22:47
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)

@iocat
iocat / getLocalIdent.js
Last active January 14, 2019 22:03
Stateful variable-length CSS Modules' class name generator (using ECMAScript Generator Function)
// @flow
/**
* Copyright (c) 2019-present, Thanh Ngo.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
@iamralch
iamralch / context.go
Created November 20, 2015 13:05
An example that illustrates how to work with https://godoc.org/golang.org/x/net/context
package main
import (
"bufio"
"fmt"
"os"
"strings"
"time"
"golang.org/x/net/context"
@mholt
mholt / everything.go
Last active April 14, 2020 13:53
Implements 103 of the 114 Go 1.3 standard library interfaces
package interfaces
import (
"bufio"
"crypto/elliptic"
"crypto/tls"
"database/sql/driver"
"debug/dwarf"
"encoding/xml"
"fmt"
@staltz
staltz / introrx.md
Last active January 15, 2026 06:27
The introduction to Reactive Programming you've been missing