Skip to content

Instantly share code, notes, and snippets.

View toffaletti's full-sized avatar
👻

Jason Toffaletti toffaletti

👻
  • Apple, Inc.
  • San Francisco, CA
View GitHub Profile
@DanB91
DanB91 / README.txt
Last active November 28, 2022 04:57
Playdate Zig starting point
THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate:
https://github.com/DanB91/Zig-Playdate-Template
The rest of this is preservied for historical reasons:
This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform.
This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware.
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@jpillora
jpillora / sshd.go
Last active February 19, 2025 16:29
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@MatthewSteel
MatthewSteel / TupleForEach.cpp
Created June 24, 2012 10:02
A "proper" for-each algorithm for tuples in C++11. Everything type-checked, no virtual function calls, heterogeneous data works.
#include <tuple>
#include <iostream>
#include <stdexcept>
using namespace std;
/*
* "A partially specialized non-type argument expression shall not involve a
* template parameter of the partial specialization except when the argument
* expression is a simple identifier."
@albeva
albeva / gist:2975962
Created June 23, 2012 00:25
C++11 variadic template based tuple sort
#include <iostream>
#include <utility>
#include <tuple>
using namespace std;
//
// forward declare
//
template<int N1, int N2, int LAST, typename T>