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 io.bazel.kotlin.compiler.plugins.strictdeps | |
import com.google.protobuf.TextFormat | |
import com.intellij.openapi.project.Project | |
import com.intellij.openapi.vfs.VfsUtilCore | |
import com.intellij.openapi.vfs.VirtualFile | |
import com.intellij.psi.PsiElement | |
import io.bazel.kotlin.compiler.BazelCompiler | |
import io.bazel.kotlin.model.JvmCompilationTask | |
import io.bazel.kotlin.model.StrictDeps |
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
// Idiomatic and efficient stack. Uses a single array. | |
type Stack interface { | |
// Push adds an item to a stack. | |
Push(i int) | |
// Pop is the item that was popped, max and sz represent the state of the stack after the pop. | |
Pop() (cur,max, sz int) | |
// Peek the current state of the stack. An empty stack returns all zeros. | |
Peek() (cur,max, sz int) | |
} |
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
# adapted from grpc-java | |
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") | |
load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library") | |
def _path_ignoring_repository(f): | |
if (len(f.owner.workspace_root) == 0): | |
return f.short_path | |
return f.path[f.path.find(f.owner.workspace_root) + len(f.owner.workspace_root) + 1:] | |
def _gensource_impl(ctx): |
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 com.axsy.base.grpc.stub | |
import io.grpc.stub.StreamObserver | |
import kotlinx.coroutines.experimental.CompletableDeferred | |
import kotlinx.coroutines.experimental.Deferred | |
import kotlinx.coroutines.experimental.Job | |
import kotlinx.coroutines.experimental.channels.LinkedListChannel | |
import kotlinx.coroutines.experimental.channels.ReceiveChannel | |
import kotlinx.coroutines.experimental.channels.SendChannel | |
import kotlinx.coroutines.experimental.launch |
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 com.github.hsyed.k8s.clusters.model; | |
import com.github.hsyed.k8s.KubernetesClusterType; | |
import com.google.common.base.MoreObjects; | |
import com.google.common.collect.ImmutableSet; | |
import com.google.common.collect.Lists; | |
import com.google.common.primitives.Booleans; | |
import com.google.errorprone.annotations.CanIgnoreReturnValue; | |
import java.util.ArrayList; | |
import java.util.List; |
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
# Sup file for https://github.com/pressly/sup | |
# | |
version: 0.5 | |
networks: | |
workers: | |
inventory: kubectl get nodes -o json | jq -r '.items[] | select(.metadata.labels["axsy.com/role"] =="worker") | .status.addresses[] | select (.type == "InternalIP") | .address | "core@" + . ' | |
controllers: | |
inventory: kubectl get nodes -o json | jq -r '.items[] | select(.metadata.labels["kubernetes.io/role"] =="master") | .status.addresses[] | select (.type == "InternalIP") | .address | "core@" + . ' |
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
def canonacalize_package_name(prefix, pkg_name): | |
return pkg_name.replace(prefix, "").replace("/", ".") | |
def junit_suite_test(name, srcs, deps, prefix = "src/test/java", size="small", resources=[], classpath_resources=[], jvm_flags=[], tags=[], data=[]): | |
tests = [] | |
if not prefix.endswith("/"): | |
prefix = prefix + "/" | |
for src in srcs: | |
if src.endswith("Test.java"): |
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
type AdminM { | |
# schema mutations | |
schema: SchemaNodeM! | |
} | |
type AdminQ { | |
# details about this org | |
info: Org! | |
# schema queries |
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 runtime | |
import ( | |
"context" | |
"errors" | |
"github.com/jackc/pgx" | |
) | |
const ( | |
existingTXError = "tx allready in progress" |
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
# remove the newline after the next line and it won't work. | |
# gazelle:ignore | |
load("@io_bazel_rules_go//go:def.bzl", "go_library") | |
config_setting( | |
name = "darwin", | |
values = {"cpu": "darwin"}, | |
) |
NewerOlder