Skip to content

Instantly share code, notes, and snippets.

View neeraj9's full-sized avatar
🎯
Focusing

Neeraj neeraj9

🎯
Focusing
  • Microsoft
View GitHub Profile
@neeraj9
neeraj9 / bandwidth_monitoring.c
Created March 29, 2018 12:57
Simple Bandwidth monitoring in Gnu Linux
/*
* Copyright (c) 2015 Neeraj Sharma. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@neeraj9
neeraj9 / building_microsoft_graphengine_from_source.sh
Created April 23, 2018 01:56
Build Microsoft GraphEngine from source on Ubuntu 16.04
# Author: Neeraj Sharma
#
# https://www.graphengine.io/docs/manual/index.html
# https://www.microsoft.com/net/learn/get-started/linux/ubuntu16-04
setup_dot_net() {
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
@neeraj9
neeraj9 / py_beamparticle_testing_runeditor
Created May 5, 2018 03:02
BeamParticle sample python program which is to be used for evaluation via runeditor
#!python
from pymongo import MongoClient
import pandas as pd
from datetime import datetime
from datetime import timedelta
import requests
import sys
import json
@neeraj9
neeraj9 / test_maps_order.erl
Created May 23, 2019 05:23
Erlang Maps Traversal Order Test
#!/usr/bin/env escript
%%% @author neerajsharma
%%% @copyright (C) 2019, Neeraj Sharma <[email protected]>
%%% @doc
%%%
%%% @end
-module(test_maps_order).
%% -*- erlang -*-
%%
@neeraj9
neeraj9 / refactor_1_strike_cpp.diff
Last active September 9, 2019 15:54
Refactor Part 1 Strike .NET Core Diagnostics Strike.cpp
diff --git a/src/SOS/Strike/strike.cpp b/src/SOS/Strike/strike.cpp
index f14b8c4..fe30347 100644
--- a/src/SOS/Strike/strike.cpp
+++ b/src/SOS/Strike/strike.cpp
@@ -153,6 +153,7 @@ const UINT kcMaxMethodDescsForProfiler = 100;
#include <set>
#include <vector>
#include <map>
+#include <tuple>
@neeraj9
neeraj9 / build_otp.sh
Created October 18, 2021 06:11 — forked from gburd/build_otp.sh
Shell script to build a debug or valgrind enabled Erlang OTP release and other helpful notes.
#!/usr/bin/env bash
# Note: erlang depends on ncurses, openssl at a minimum
usage ()
{
echo "usage: $0 <release> <type>"
echo " release: R14B01|R14B02|R14B03|R14B04|R15B|R15B01|R15B02|R15B03|R16B|R16B01|R16B02"
echo " type: normal, opt, gcov, gprof, debug, valgrind, or lcnt"

Linux and Unix operating systems comes in a wide range of flavors often bundled as different distributions by different vendors. Every one of these distribution also comes with an often pre-defined and latest version of the Linux kernel. Sometimes you need to know the exact name and version of your operating system, machine as well as the kernel, be it to install the correct version of a software, find if a hardware is compatible or be it to upgrade your OS itself. There are several ways to check your operating system and linux kernel versions. As each distribution (or distros) are slightly different some of the commands might work in some distros while some maynot.

uname

uname is the linux command which prints out the name, versions and other details of the machine and kernel running on the machine. It is basically short for Unix Name. This is usually part of the core-utils package and should be available on almost all distros. There are several options available to print out just the kernel detail

@neeraj9
neeraj9 / findlinks.c
Created April 16, 2023 04:07 — forked from juntalis/findlinks.c
Find hard links for a given filepath
@neeraj9
neeraj9 / Find-SDKTool.ps1
Created April 16, 2023 04:07 — forked from JeffJacobson/Find-SDKTool.ps1
A script that finds different versions of Windows .NET SDK tools in expected directories.
<#
.SYNOPSIS
Finds an SDK tool in .NET SDK folders
.INPUTS
Name of tool (exe filename) to search for. (E.g., svcutil.exe)
.OUTPUTS
Outputs a list of matching filenames along with properties about the directories
* Windows SDK version
* .NET version
* 32- or 64-bit exe
@neeraj9
neeraj9 / docker-intro-session-ex-1.ps1
Created April 16, 2023 04:08 — forked from jamesattard/docker-intro-session-ex-1.ps1
Docker Intro Session Exercise #1
# In this exercise we are going through the Docker fundamental commands.
# After completing this lab, you are expected to know how to:
#
# a. find Docker images
# b. run containers
# c. stop containers
# d. delete containers
#
# Docker Intro Session Lab - James Attard (2019)