Skip to content

Instantly share code, notes, and snippets.

@Yejneshwar
Yejneshwar / forge.js
Created September 25, 2024 18:19
Forge library for use with Postman
This file has been truncated, but you can view the full file.
var forge =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
@Yejneshwar
Yejneshwar / AddGrpcAndProtos.cmake
Created August 16, 2024 23:18
Add GRPC and Protofiles to CMake
include(FetchContent)
function(ADD_GRPC_AND_PROTOS PROTO_FOLDER_PATH PROTO_FILE_NAME)
message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!BEGIN PROTO GEN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROTO_FOLDER_PATH}/${PROTO_FILE_NAME}.proto")
message("Proto file found ${CMAKE_CURRENT_SOURCE_DIR}/${PROTO_FOLDER_PATH}/${PROTO_FILE_NAME}.proto")
else()
message(FATAL_ERROR "Proto file not found : ${CMAKE_CURRENT_SOURCE_DIR}/${PROTO_FOLDER_PATH}/${PROTO_FILE_NAME}.proto")
endif()
@Yejneshwar
Yejneshwar / CMakeSettings.json
Last active November 26, 2023 12:57
VScode Windows - Workspace Settings
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [],
"buildRoot": "${projectDir}\\build",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DPICO_SDK_PATH=\"%ProgramFiles%/Raspberry Pi/Pico SDK v1.5.1/pico-sdk\" -DPICO_BOARD=pico_w -DPICO_REG_KEY=\"Software/Raspberry Pi/Pico SDK v1.5.1\" -DPICO_INSTALL_PATH=\"%ProgramFiles%/Raspberry Pi/Pico SDK v1.5.1\" -DPICO_SDK_VERSION=\"1.5.1\" -DOPENOCD_SCRIPTS=\"%ProgramFiles%/Raspberry Pi/Pico SDK v1.5.1/openocd/scripts\"",
@Yejneshwar
Yejneshwar / create-service.sh
Last active September 1, 2024 12:30
Create new systemd service
#!/bin/bash
# Check for help flag
if [ "$1" == "-h" ] || [ "$1" == "--help" ]
then
echo "Create a systemd service file"
echo "Usage: ./create-service.sh -s <service name> -c <command> -w <working directory> -E <run service at startup>"
exit 0
fi