Skip to content

Instantly share code, notes, and snippets.

View matey-jack's full-sized avatar

Robert Jack Will matey-jack

View GitHub Profile
@rust-play
rust-play / playground.rs
Created October 26, 2019 10:45
Code shared from the Rust Playground
//! A doubly-linked list in 50 LOCs of stable and safe Rust.
use std::cell::RefCell;
use std::rc::{Rc, Weak};
use std::fmt::Display;
// The node type stores the data and two pointers.
//
// It uses Option to represent nullability in safe Rust. It has zero overhead
// over a null pointer due to the NonZero optimization.
//
@matthewp
matthewp / .gitignore
Created February 28, 2019 14:41
Preact in Deno
node_modules/
out.js
anonymous
anonymous / index.html
Created November 8, 2017 14:09
resizable-svg-001
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>resizable-svg-001</title>
<link rel="stylesheet" href="styles.css">
<script type="application/dart" src="main.dart"></script>
</head>
anonymous
anonymous / index.html
Created November 7, 2017 17:40
resizable-svg-001
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>resizable-svg-001</title>
<link rel="stylesheet" href="styles.css">
<script type="application/dart" src="main.dart"></script>
</head>
@mikehearn
mikehearn / KotlinDuckTyping.kt
Created December 18, 2015 13:46
Kotlin duck typing / type classing fiddle
class A {
fun shout() = println("go team A!")
}
class B {
fun shout() = println("go team B!")
}
interface Shoutable {
fun shout()
@ltackmann
ltackmann / SVGSamples.dart
Created December 29, 2011 04:09
SVG in Dart
#import('dart:html');
class SVGSamples {
void run() {
drawlines();
}
void drawlines() {
final int maxY = 250;