Skip to content

Instantly share code, notes, and snippets.

View OmkarKirpan's full-sized avatar

Omkar Kirpan OmkarKirpan

View GitHub Profile
OmkarKirpan /
Last active March 17, 2023 12:27
an automation javacript script that removes the "ban-sensitive-files" module from the dev dependencies of microservices hosted on GitHub Enterprise Server.

Remove Ban-Sensitive-Files Module

A script that removes the ban-sensitive-files module from the devDependencies of microservices hosted on GitHub Enterprise Server. The script performs the following actions for each repository:

  • Clone the repository to a local directory
  • Create a new branch named feature/remove-ban-sensitive-files from the given branch name
  • Remove the ban-sensitive-files module from the devDependencies of the package.json file
  • Rebuild the package-lock.json file
  • Commit the changes to the new branch and push them to the remote repository
  • Create a pull request with the title "Remove ban-sensitive-files module from dev dependencies" and a message detailing the changes made.
OmkarKirpan / SCORM_cheat.js
Created March 1, 2023 19:53
let ok = SCORM_GetAPI()
// setting lesson_status
ok.LMSSetValue('cmi.core.lesson_status', 'completed')
// setting score
ok.LMSSetValue('cmi.core.score.raw', '100')
// Saving
OmkarKirpan /
Created September 14, 2022 04:09
store decoded binary file to path
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Base64;
import java.util.List;
public class FilesReadFileExample {
public static void main(String[] args) {
OmkarKirpan / SimpleSmartContract.sol
Created July 22, 2021 15:43
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
pragma solidity ^0.5.0;
contract SimpleSmartContract {}
OmkarKirpan / fix-wsl2-dns-resolution
Created June 14, 2021 18:24 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
OmkarKirpan / OneDirect.js
Created February 11, 2021 07:44
OneDirect AutoRefresh Chats
// ==UserScript==
// @name OneDirect AutoRefresh Chats
// @namespace
// @version 1.0
// @description Auto refresh Onedirect Chats
// @author Omkar Kirpan
// @match https://**
// @require
// @require
// @grant none
OmkarKirpan /
Created December 2, 2019 19:17 — forked from jgamblin/
Script to NMAP a network and Post Differences to Slack
OPTIONS="-v -T4 -F -sV"
date=$(date +%Y-%m-%d-%H-%M-%S)
cd /nmap/diffs
nmap $OPTIONS $TARGETS -oA scan-$date > /dev/null
curl -F file=@diff-$date -F initial_comment="Internal Port Change Detected" -F channels=#alerts -F token=xxxx-xxxx-xxxx
OmkarKirpan / The Technical Interview Cheat
Created November 28, 2019 07:04 — forked from tsiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.


I have moved this over to the Tech Interview Cheat Sheet Repo since a gist is too difficult to maintain as an open source endevaor and there is no way to version it. I have updated below, but I will not be able to keep this one up to date so please checkout the repo instead. The below is just for some preservation for those who stumble across here.