Skip to content

Instantly share code, notes, and snippets.

View sarcasticadmin's full-sized avatar
🏴‍☠️

Robert James Hernandez sarcasticadmin

🏴‍☠️
View GitHub Profile
@talawahtech
talawahtech / docker-hub-api.sh
Last active January 16, 2022 14:15
Docker Hub - Create repo with automated build for TechEmpower benchmark
#!/bin/sh
export UNAME=""
export UPASS=""
export DOCKERHUB_NAMESPACE="techempower"
export FRAMEWORK_LANG="C"
export FRAMEWORK="libreactor"
export GITHUB_ORG="TechEmpower"
export GITHUB_REPO="FrameworkBenchmarks"
#Authenticate
with builtins;
let
pkgs = import ../nixpkgs { overlays = []; config={oraclejdk.accept_license = true;}; };
# clean evals
cc1 = pkgs.lib.mapAttrs (n: v: (builtins.tryEval v).value ) (pkgs.recurseIntoAttrs pkgs);
# Only top level derivations
cc2 = pkgs.lib.filterAttrs (n: v: pkgs.lib.isDerivation v) cc1;
# Filter for meta tags
#!/bin/bash
set -eu
usage() {
cat >&2 <<'EOF'
usage: ./difflog $out1 $out2
Compare two Nix build logs, normalizing out boring differences.
This can be useful to test the effect of a change to build scripts,
@csobankesmarki
csobankesmarki / convert private key
Last active July 18, 2024 17:12
Convert OpenSSH ED25519 to OpenSSL ED25519
(printf \\x30\\x2e\\x02\\x01\\x00\\x30\\x05\\x06\\x03\\x2b\\x65\\x70\\x04\\x22\\x04\\x20;egrep -v "^-" | tr -d '\n' | base64 -d | dd bs=161 skip=1 2>/dev/null | dd bs=32 count=1 2>/dev/null) | openssl pkey -inform der -outform pem
@wolfeidau
wolfeidau / template.yaml
Last active August 22, 2025 22:56
Firehose to datadog
AWSTemplateFormatVersion: '2010-09-09'
Description: "wolfeidau: Notifications stream which sends events to datadog"
Parameters:
Environment:
Type: String
AllowedValues: [prod, nonprod]
DatadogHttpEndpointUrl:
Type: String
Default: https://aws-kinesis-http-intake.logs.datadoghq.com/v1/input
@ConnorBaker
ConnorBaker / arrow.nix
Last active December 19, 2025 14:13
A bad implementation of Control.Arrow in Nix
let
inherit (builtins)
add
div
elemAt
isFunction
length
mul
sub
throw