Skip to content

Instantly share code, notes, and snippets.


Ian McKellar ianloic

View GitHub Profile
View blink.pcf
import typing, math
from nmigen import *
from import Platform
from nmigen.back.pysim import Simulator, Delay
class Pulse(Elaboratable):
def __init__(self,
frequency: float,
clock_frequency: typing.Optional[float],
View strace-deps
if [[ $# -lt 2 ]]; then
echo "Usage: $0 <depfile> <command...>" >&2
exit 1
# The .d file we're going to write.
ianloic / Makefile
Created Sep 7, 2019
fontconfig is easy
View Makefile
CFLAGS=$(shell pkg-config --cflags fontconfig)
LDFLAGS=$(shell pkg-config --libs fontconfig)
example: example.o
View error.html
<title>No Tunnel</title>
<h1>No Tunnel</h1>
<p>There is no tunnel configured for <i><script>document.write(</script></i>...</p>
<p>Create a tunnel with:
ianloic /
Last active Mar 3, 2020
Why is this wrong?
#include <iostream>
#include <string>
#include <vector>
void test_string_vector() {
std::vector<std::string> v;
const char* one = v.emplace_back("one").data();
std::cout << "added one" << std::endl;
std::cout << "v.capacity() = " << v.capacity() << std::endl;
ianloic / hello-rdl.rb
Created Sep 24, 2018
Various hellos world.
View hello-rdl.rb
require 'rdl'
require 'types/core'
extend RDL::Annotate
type '(String) -> nil', typecheck: :now
def greet(name)
puts "hello, #{name}."
View main.dart
import 'dart:async';
class AsyncProxyController<T> {
class AsyncProxy<T> {
AsyncProxyController<T> ctrl;
View events.dart
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// WARNING: This file is machine generated by fidlgen.
library fidl_fidl_examples_events$async;
import 'dart:async';
import 'dart:typed_data';
View main.dart
import 'dart:async';
import 'other.dart' show Error;
abstract class Wlan {
Future<Error> method();
class WlanFuturize {
final Wlan _inner;
You can’t perform that action at this time.