Skip to content

Instantly share code, notes, and snippets.

View arutkayb's full-sized avatar

Rutkay arutkayb

View GitHub Profile
@arutkayb
arutkayb / hunt-crash-log
Created March 4, 2026 07:15
Use this file to create an agent skill/command to hunt logs
---
name: hunt-crash-log
description: >
Use this skill when the user pastes a Firebase Crashlytics crash log,
raw exception/stack-trace text, or a screenshot of breadcrumbs.
Also triggers on phrases like "hunt this crash", "debug this crash",
"crashlytics log", "breadcrumbs", "investigate this crash", "crash report".
---
# Hunt Crash Log

MR Comments

Fetch all comments/discussions from the current GitLab Merge Request.

Instructions

  1. Determine the current branch: git branch --show-current
  2. Get the GitLab project path from the git remote: git remote get-url origin, then extract the project path (remove .git suffix and host prefix)
  3. URL-encode the project path (replace / with %2F)
  4. Find the open MR for the current branch using:
@arutkayb
arutkayb / index.ts
Created November 11, 2021 19:19
Firebase functions campaign cronjob
import * as timeUtils from "./util/time_utils";
const functions = require("firebase-functions");
const admin = require("firebase-admin");
admin.initializeApp();
// Remote config:
// {
// "discount_start_date": "2021.10.23 00:00:00",
cookieCountPerServing = 3;
caloriesPerCookie = 160 / cookieCountPerServing;
fatInGramPerCookie = 7 / cookieCountPerServing;
sodiumPerCookieInMgram = 190 / cookieCountPerServing;
carbPerCookieInGram = 25 / cookieCountPerServing;
print("calories per cookie: " + str(caloriesPerCookie));
print("fat in gram per cookie: " + str(fatInGramPerCookie));
print("sodium in mgram per cookie: " + str(sodiumPerCookieInMgram));
print("carb in gram per cookie: " + str(carbPerCookieInGram));