Skip to content

Instantly share code, notes, and snippets.

@purkhusid
purkhusid / bazel-diff.sh
Created May 10, 2022 09:16
Bazel diff script
#! /usr/bin/env bash
function get_affected_targets_path() {
echo "/tmp/bazel_diff_affected_targets"
}
function get_affected_targets() {
#Path to your Bazel WORKSPACE directory
local workspace_path=$1
# Path to your Bazel executable
# Python
# Special logic for building python interpreter with OpenSSL from homebrew.
# See https://devguide.python.org/setup/#macos-and-os-x
_py_configure = """
if [[ "$OSTYPE" == "darwin"* ]]; then
./configure --prefix=$(pwd)/bazel_install --with-openssl=$(brew --prefix openssl)
else
./configure --prefix=$(pwd)/bazel_install
fi
"""
@purkhusid
purkhusid / grpc.fs
Created April 20, 2021 09:35
F# gRPC Service
module Main
open Libraries.Grpc
open Libraries.Logging
open Libraries.Sentry
open Libraries.Tracing
open System
open Grpc.Core
open Grpc.HealthCheck
open Grpc.Health.V1
@purkhusid
purkhusid / query_pb2.py
Created January 20, 2020 16:21
Bazel - Transitive hashes for targets
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: deployment/scripts/util/bazel-affected-targets/query.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
using System;
using System.Collections.Generic;
using System.DirectoryServices.AccountManagement;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Thinktecture.IdentityServer.Core;
using Thinktecture.IdentityServer.Core.Models;
using Thinktecture.IdentityServer.Core.Services;