Skip to content

Instantly share code, notes, and snippets.

View amsv01's full-sized avatar

Amin Mousavi amsv01

  • Klarna AB
  • Stockholm
View GitHub Profile
@amsv01
amsv01 / splunk-expander.js
Last active April 25, 2022 09:13
Expand all nested Splunk result objects
// ==UserScript==
// @name Splunk expands
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include *://*.domain.se/*
// @include *://domain.com/*
// @include https://domain.se/*
@amsv01
amsv01 / combineFiles.js
Created May 19, 2024 19:59
Node file utils
const fs = require('fs')
const path = require('path')
// Function to get all .ts files recursively
const getAllTsFiles = (dir, fileList = []) => {
const files = fs.readdirSync(dir)
files.forEach((file) => {
const filePath = path.join(dir, file)
if (fs.statSync(filePath).isDirectory()) {
fileList = getAllTsFiles(filePath, fileList)