Skip to content

Instantly share code, notes, and snippets.

View adrian-gierakowski's full-sized avatar

Adrian adrian-gierakowski

View GitHub Profile
@SeaJaredCode
SeaJaredCode / README.md
Last active December 2, 2023 07:25
Command line support for getting tokens from Google IAP, with ArgoCD example for working with token.

Overview

The file iap_credentials_helper.sh is broadly applicable to fetch tokens for use by CLI tools that can't navigate Google's IAP via the API.

ArgoCD Wrapper Use

This wrapper is intended to be a very lightweight addition to the standard argocd command. Specifically, removing the need to type `-- header: Bearer ${IAP_TOKEN}" (or similar) onto every command!

@roberth
roberth / minimod.nix
Last active December 29, 2023 07:47
Simple and quick module system alternative + thoughts and tasks
/*
minimod: A stripped down module system
TODO Comparison:
- [ ] Come up with a benchmark "logic" using plain old functions and let bindings
- [ ] Write the benchmark for the module system
- [ ] Write the benchmark for POP?
- [ ] Qualitative comparison of extensibility in the context of composable
Nixpkgs packaging logic
TODO Fine-tuning:
self: super:
{
# Install overlay:
# $ mkdir -p ~/.config/nixpkgs/overlays
# $ curl https://gist.githubusercontent.com/LnL7/570349866bb69467d0caf5cb175faa74/raw/3f3d53fe8e8713ee321ee894ecf76edbcb0b3711/lnl-overlay.nix -o ~/.config/nixpkgs/overlays/lnl.nix
userPackages = super.userPackages or {} // {
# Example:
hello = self.hello;
@robertjpayne
robertjpayne / RCTSwiftBridgeModule.h
Last active January 17, 2024 11:43
React Native - Swift Native Modules
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
#define RCT_EXTERN_MODULE(objc_name, objc_supername) \
RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername)
#define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \
objc_name : objc_supername \
@end \
@interface objc_name (RCTExternModule) <RCTBridgeModule> \
import {
Span as SentrySpan,
SpanStatusType,
getActiveSpan,
getActiveTransaction,
getCurrentHub,
startSpanManual,
startTransaction,
} from "@sentry/core"
import type * as Sentry from "@sentry/types"
@tazjin
tazjin / thoughts.md
Last active February 28, 2024 12:05
Nix builder for Kubernetes
@lheckemann
lheckemann / 0-readme.md
Last active March 11, 2024 13:11
Expression for a buildEnv-based declarative user environment.

Expression for a buildEnv-based declarative user environment

This is one way of managing your user profile declaratively.

Alternatives include:

  • an attrset-based nix-env-based environment, installed using nix-env -ir rather than nix-env --set. LnL has an overlay which shows a way of doing this.
  • home-manager, which provides NixOS-like config for your $HOME

Note that this is incompatible with regular imperative use of nix-env, e.g. nix-env -iA nixpkgs.hello. It has the advantage of allowing the installation of multiple outputs of the same package much better than nix-env's builtin profile builder does.

@geoffjay
geoffjay / starship.toml
Last active March 19, 2024 03:57
Starship prompt with nord colors
"$schema" = "https://starship.rs/config-schema.json"
# colorscheme
#
# #2E3440
# #3B4252
# #434C5E
# #4C566A
# #D8DEE9
# #E5E9F0
@travisbhartwell
travisbhartwell / nix-shell-shebang.md
Last active March 29, 2024 19:55
nix-shell and Shebang Lines

NOTE: a more up-to-date version of this can be found on my blog

nix-shell and Shebang Lines

A few days ago, version 1.9 of the Nix package manager was released. From the release notes:

nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.

@robinp
robinp / nixos-hydra-git.txt
Last active April 16, 2024 06:20
Hydra with Git setup links
Lots of goodies like <githubstatus> pinging.
https://github.com/input-output-hk/iohk-ops/blob/bc8195de286d8b9b55b06f2046ab5412307a51b6/modules/hydra-master-common.nix
Declarative jobset bootstrapping:
https://github.com/shlevy/declarative-hydra-example
Declarative jobset with Git PR evals:
https://github.com/cleverca22/hydra-configs/tree/master/toxvpn
Other notes: