This file contains hidden or 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
#!/usr/bin/python | |
import click | |
import json | |
import yaml | |
from collections import defaultdict | |
from os import path |
This file contains hidden or 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
// This code "borrowed" (and then adapted) from corefx (2.0). | |
static class ClientWSFactory | |
{ | |
/// <summary> | |
/// GUID appended by the server as part of the security key response. | |
/// | |
/// Defined in the RFC. | |
/// </summary> | |
const string WSServerGuid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; |
This file contains hidden or 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
StringBuilder lineBuilder = new StringBuilder(); | |
Encoding encoding = Encoding.UTF8; | |
// A Decoder is stateful; it remembers if it's halfway through decoding a multi-byte character. | |
Decoder decoder = encoding.GetDecoder(); | |
byte[] buffer = new byte[10]; | |
int bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length); | |
while (bytesRead > 0) |
This file contains hidden or 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
#!/bin/bash | |
set -euo pipefail | |
apt update | |
apt install -y --no-install-recommends apt-transport-https curl software-properties-common | |
apt install -y --no-install-recommends linux-image-extra-$(uname -r) linux-image-extra-virtual | |
curl -fsSL 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add - | |
add-apt-repository "deb https://packages.docker.com/1.12/apt/repo/ ubuntu-$(lsb_release -cs) main" | |
apt update |
This file contains hidden or 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
# | |
master_config: master | |
log_file: /var/log/salt/salt-cloud.log | |
log_level_logfile: debug | |
pki_dir: pki | |
# Influences the list_nodes_select function of cloud providers | |
query.selection: | |
- id |
This file contains hidden or 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
using System; | |
using System.Reactive; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Linq; | |
namespace HistoricalScheduling | |
{ | |
static class Program | |
{ | |
public static void Main() |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace SpanString | |
{ | |
public static class Rope | |
{ |
This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Reactive; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
/// <summary> | |
/// Extension methods for System.IO types. | |
/// </summary> | |
public static class IOExtensions |
This file contains hidden or 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
using Akka.Actor; | |
using Akka.DI.Core; | |
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
using System.Collections.Concurrent; | |
/// <summary> | |
/// An Akka.NET dependency resolver using Microsoft.Extensions.DependencyInjection. | |
/// </summary> | |
public class MedDependencyResolver |
This file contains hidden or 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
FROM gcr.io/google_containers/fluentd-elasticsearch:1.22 | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends make gcc g++ libc6-dev ruby-dev && \ | |
td-agent-gem install fluent-plugin-concat --version '~>1.0.0' --no-ri --no-rdoc && \ | |
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false make gcc g++ libc6-dev ruby-dev | |
# Copy the Fluentd configuration file for concatenating lines in docker logs. | |
COPY td-agent.conf /etc/td-agent/td-agent.conf |