Skip to content

Instantly share code, notes, and snippets.

View Tehnix's full-sized avatar
🌞
Enjoying the code...

Christian Kjær Tehnix

🌞
Enjoying the code...
View GitHub Profile
@Tehnix
Tehnix / @posthog%[email protected]
Created October 24, 2025 12:18
Patch for @posthog/ai to support Vertex AI authentication options
diff --git a/node_modules/@posthog/ai/.bun-tag-3a4e90bd86b41871 b/.bun-tag-3a4e90bd86b41871
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/dist/gemini/index.d.ts b/dist/gemini/index.d.ts
index a48fbe3bc9b822d6ce432243a1226aa53481e87b..e700180a757342848740be2c435904b61271f0c2 100644
--- a/dist/gemini/index.d.ts
+++ b/dist/gemini/index.d.ts
@@ -1,4 +1,4 @@
-import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse } from '@google/genai';
+import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse, GoogleGenAIOptions } from '@google/genai';
@Tehnix
Tehnix / gp.sh
Created January 21, 2025 09:51
Helper function for blocking push to main and automatically creating a Pull Request on push if none exist
#!/usr/bin/env bash
# Optional, if you have gp aliased already:
# unalias gp
function gp() {
branchName=$(git branch --show-current)
# Only run if in a specific organization.
# gitRemote=$(git config --get remote.origin.url)
# Use this instead: if [[ "$gitRemote" = *":yaaytravel/"* && "$branchName" != "main" ]]; then
if [[ "$branchName" != "main" ]]; then
@Tehnix
Tehnix / _lib sqs.ts
Created December 16, 2024 08:59
CDK for IoT Data Ingestion
import * as cdk from 'aws-cdk-lib';
import * as sqs from 'aws-cdk-lib/aws-sqs';
import { Construct } from 'constructs';
interface StackProps extends cdk.StackProps {
/**
* The name of the queue.
*/
readonly queueName: string;
@Tehnix
Tehnix / Linear Widget.js
Last active March 17, 2025 11:03
Linear iOS/macOS widget using Scriptable
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: teal; icon-glyph: magic;
const LINEAR_API_KEY = "lin_api_....";
const WIDGET_SIZE = config.widgetFamily; // "small" | "medium" | "large"
const VIEW_ID = "....-....-....-...-....."; // Your Linear view ID.
const TEAM_ID = "LTI"; // Your Linear team ID.
const DEFAULT_ASSIGNEE = "displayName"; // Your Linear display name.
const DEFAULT_PROJECT = "....-....-....-...-....."; // The default project to create issues in.
const DEFAULT_STATUS = "Backlog"; // The default status to create issues with.
let
bootPkgs = import <nixpkgs> { };
ghcide-pkgs = import (builtins.fetchTarball
"https://github.com/hercules-ci/ghcide-nix/tarball/master") { };
# We use a patched fork of base-noprelude which is compatible with GHCJS.
base-noprelude-src = bootPkgs.fetchFromGitHub {
owner = "codetalkio";
repo = "base-noprelude";
rev = "00b9f86b788d5e3558846b292a6bf6b25816647b";
@Tehnix
Tehnix / nix-shell error
Created April 12, 2020 20:41
Output of `nix-shell --show-trace`
error: while evaluating the attribute 'NIX_GHC' of the derivation 'ghc-shell-for-miso-spa-0.1.0.0' at /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-modules/make-package-set.nix:308:9:
while evaluating 'ghcWithPackages' at /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-modules/make-package-set.nix:243:23, called from /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell
-modules/make-package-set.nix:299:18:
while evaluating 'withPackages' at /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-modules/make-package-set.nix:116:18, called from /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-mo
dules/make-package-set.nix:243:35:
while evaluating 'callPackageWith' at /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/lib/customisation.nix:108:35, called from /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-modules/make-package-set.nix:11
6:28:
while evaluati
let
bootPkgs = import <nixpkgs> { };
ghcide-pkgs = import (builtins.fetchTarball
"https://github.com/hercules-ci/ghcide-nix/tarball/master") { };
# We use a patched fork of base-noprelude which is compatible with GHCJS.
base-noprelude-src = bootPkgs.fetchFromGitHub {
owner = "codetalkio";
repo = "base-noprelude";
rev = "00b9f86b788d5e3558846b292a6bf6b25816647b";
@Tehnix
Tehnix / CI.yml
Created March 30, 2020 21:21 — forked from FedericoPonzi/CI.yml
Ready to use Github workflow for cross-compiling a rust binary to many Linux architectures.
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- 'v*.*.*'
@Tehnix
Tehnix / nix-miso-macos-catalina.md
Last active May 14, 2020 20:29
Getting Nix and Miso set up on macOS Catalina

Setting up Nix

Following this thread on getting Nix set up on macOS Catalina, there's a few steps involved (assuming you have no /nix folder):

  1. Set up nix folder: echo 'nix' | sudo tee -a /etc/synthetic.conf

  2. Reboot for it to take effect

  3. Create an APFS volume for Nix (might need to use a different diskX number, check diskutil list for more):

sudo diskutil apfs addVolume disk1 APFSX Nix -mountpoint /nix

@Tehnix
Tehnix / .travis.yml
Created January 3, 2019 19:17 — forked from tonyday567/.travis.yml
A multi-ghc/cabal/stack haskell travis
language: haskell
dist: trusty
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work