Skip to content

Instantly share code, notes, and snippets.

#
# .bazelrc has --test_tag_filters=-integration
# so integration tagged tests are skipped by default
#
echo ">> 🧐 Running Isolated Tests 🧐 <<"
START_TIME=$SECONDS
./bazel test \
//...
ELAPSED_TIME_MS_TEST=$(((SECONDS - START_TIME)*1000))
load(":providers.bzl", "TypeScriptModuleInfo")
def _test_sources_aspect_impl(target, ctx):
result = depset()
if hasattr(ctx.rule.attr, "tags") and "NODE_MODULE_MARKER" in ctx.rule.attr.tags:
return struct(node_test_sources=result)
if hasattr(ctx.rule.attr, "deps"):
load("//packages/bazel/rules_common:defs.bzl",
"module_mappings_runtime_aspect",
"collect_node_modules_aspect",
"sources_aspect",
"test_sources_aspect",
"short_path_to_manifest_path",
"get_ci")
load("//packages/bazel/rules_nodejs/internal/node:node.bzl", "nodejs_binary_impl",
"NODE_EXECUTABLE_OUTPUTS", "BASE_NODE_EXECUTABLE_ATTRS", "NODE_TOOLCHAINS")
const jest = require('jest-cli');
const fs = require('fs-extra');
const nodePath = require('path');
const outputDir = process.env.TEST_UNDECLARED_OUTPUTS_DIR;
const cwd = process.cwd();
const getSnapshotPath = (testResult) => {
const filePath = nodePath.relative(cwd, testResult.testFilePath);
load("@io_bazel_rules_go//go:def.bzl", "go_path")
load("@io_bazel_rules_go//go/private:providers.bzl", "GoLibrary", "GoPath")
_MOCKGEN_TOOL = "@com_github_golang_mock//mockgen"
def _gomock_sh_impl(ctx):
go_toolchain = ctx.toolchains["@io_bazel_rules_go//go:toolchain"]
gopath = "$(pwd)/" + ctx.var["BINDIR"] + "/" + ctx.attr.gopath_dep[GoPath].gopath
@pescobar
pescobar / build-git.sh
Created October 5, 2015 07:14
compile git with openssl instead of gnutls
#!/usr/bin/env bash
# Clear out all previous attempts
rm -rf "/tmp/source-git/"
# Get the dependencies for git, then get openssl
sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
mkdir -p "/tmp/source-git/"
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active February 24, 2024 04:41
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@denolfe
denolfe / Remove-alt-tab-animation-from-elementary-os-freya.md
Last active September 19, 2017 13:21
Remove Alt-Tab animation from Elementary OS Freya

Remove Alt-Tab animation from Elementary OS Freya

Install custom build of Gala

sudo apt-get install bzr 

bzr branch lp:~gala-dev/gala/no-depth-alt-tab

sudo apt-get build-dep gala 
@sparrc
sparrc / phabricator_readme.md
Last active March 25, 2024 05:59
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers:

@oriSomething
oriSomething / some-component.js
Last active April 3, 2020 09:45
Reflux + React + ES7 decorators
import React, { Component } from 'react';
import storeDecorator from './store-decorator';
import someStore, { SOME_STORE_SYMBOL } from './some-reflux-store';
@storeDecorator(someStore)
class SomeComponent extends Component {
render() {
return (
<div>
{this.state[SOME_STORE_SYMBOL].someProperty}