Skip to content

Instantly share code, notes, and snippets.

Ian McKellar ianloic

Block or report user

Report or block ianloic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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 Jan 3, 2019
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;
ianloic / NUCReset.ino
Created Nov 13, 2017
Adafruit Feather Sketch for sending a reset signal to an Intel NUC using a Non-Latching Relay Featherwing with signal on A2
View NUCReset.ino
int SIGNAL = A2;
void setup() {
// start serial port at 9600 bps and wait for port to open:
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
ianloic /
Last active May 19, 2017
Comparing scp and netcp, nuc ethernet and USB ethernet
set -eu
# gzip a user.bootfs to make a high-entropy test files
# make 10M, 1M, 100K, 10K test files
gzip -c < $FUCHSIA_BUILD_DIR/user.bootfs | dd of=test-file-10M bs=1M count=10 iflag=fullblock
dd if=test-file-10M of=test-file-1M bs=1M count=1
dd if=test-file-10M of=test-file-100K bs=10K count=10
dd if=test-file-10M of=test-file-10K bs=10K count=1
You can’t perform that action at this time.