This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index 54ee978..a50ee9a 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -46,8 +46,8 @@ ifeq ($(USE_SYSTEM_GTEST),no) | |
GTEST_CXXFLAGS := -std=gnu++14 | |
GTEST_LIBS := gtest.a | |
else | |
-GTEST_CXXFLAGS := $(shell gtest-config --cxxflags) | |
-GTEST_LIBS := $(shell gtest-config --libs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Based on demo_userns.c by Michael Kerrisk | |
Copyright 2013, Michael Kerrisk | |
Licensed under GNU General Public License v2 or later | |
*/ | |
#define _GNU_SOURCE | |
#include <sys/wait.h> | |
#include <sys/sysmacros.h> | |
#include <sys/mount.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2015 gRPC authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Coroutine pipeline. | |
Based off https://www.lua.org/pil/9.2.html. | |
""" | |
import types | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Lua-style coroutines. | |
Examples taken from https://www.lua.org/pil/9.html. | |
""" | |
import types | |
class Coroutine: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Producer/Consumer coroutines.""" | |
import asyncio | |
q = asyncio.Queue(7) | |
def reader(iterable): | |
"""Producer.""" | |
it = iter(iterable) | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Print size and contents of a PIPE | |
* Author: David Coles <coles.david@gmail.com> | |
*/ | |
#define _GNU_SOURCE | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/ioctl.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print the number of bytes unread in a fifo. | |
# David Coles <coles.david@gmail.com> | |
import argparse | |
import ctypes | |
import fcntl | |
import os | |
import sys | |
import termios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> |