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
{ pkgs }: | |
with pkgs; | |
let | |
# copied directly from an old version of nixpkgs: | |
# https://github.com/NixOS/nixpkgs/blob/e8e39a55a0e0a4cbf6a76dfe914efa559f92aeaa/ | |
# pkgs/development/tools/continuous-integration/fly/default.nix | |
original = buildGoModule rec { | |
pname = "fly"; | |
version = "7.8.3"; |
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
#!/usr/bin/env nix-shell | |
#!nix-shell -i python3 | |
import argparse | |
import sys | |
import typing as t | |
import subprocess | |
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
#!/usr/bin/osascript | |
# usage: zoom <room-number> [room-password] [--name=NAME] | |
on split(theString, theDelimiter) | |
set oldDelimiters to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to theDelimiter | |
set theArray to every text item of theString | |
set AppleScript's text item delimiters to oldDelimiters | |
return theArray |
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
load( | |
":common.bzl", | |
"FilesInfo", | |
) | |
def _strip_prefix(value, prefix): | |
if value.startswith(prefix): | |
return value[len(prefix):] | |
else: | |
return value |
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
[alias] | |
tardis = "!f() { \ | |
git --no-pager log --color -g --abbrev-commit --pretty='%C(auto)%h% D %C(blue)%cr%C(reset) %gs (%s)' \ | |
| fzf --ansi \ | |
| cut -d \" \" -f 1 \ | |
| xargs -I {} bash -c \"( git name-rev --no-undefined --name-only {} 2>/dev/null || echo {} )\" \ | |
| xargs git checkout; \ | |
}; f" |
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
#!/usr/bin/env bash | |
function show_usage { | |
cat <<'EOF' | |
Converts Bazel's build event protocol to JUnit XML | |
usage: bep-json-to-junit-xml <output-dir> [<input-bep-json>] | |
options: | |
output-dir : The directory to write junit xmls. |
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
import cats._ | |
import cats.implicits._ | |
type Coalgebra[F[_], A] = A => F[A] | |
type Algebra[F[_], A] = F[A] => A | |
type ListF[A, B] = Option[(A, B)] | |
implicit def functorListF[A]: Functor[ListF[A, ?]] = | |
Functor[Option].compose[(A, ?)] |
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
# | |
# .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)) |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Basename; | |
my $bfg_jar_url = "https://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar"; | |
sub trim { |
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 ( | |
/* | |
#cgo CFLAGS: -x objective-c | |
#cgo LDFLAGS: -framework Foundation -framework CoreLocation | |
#import <CoreLocation/CoreLocation.h> | |
@interface WhereAmI : NSObject <CLLocationManagerDelegate> |
NewerOlder