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 / effective_modern_cmake.md
Created June 4, 2023 18:38 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@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)
@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 / findlinks.c
Created April 16, 2023 04:07 — forked from juntalis/findlinks.c
Find hard links for a given filepath

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 / 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"
@neeraj9
neeraj9 / elixir_to_erlang.erl
Created December 18, 2017 22:06 — forked from habibutsu/elixir_to_erlang.erl
Elixir to Erlang
% erl -pa /usr/share/elixir/1.0.5/lib/*/ebin -elixir ansi_enabled true
application:ensure_all_started(elixir),
rr("/usr/share/elixir/1.0.5/lib/elixir/src/elixir.hrl").
% A simplified version of 'Elixir.Code':eval_string/2
% https://github.com/elixir-lang/elixir/blob/v1.2.0/lib/elixir/lib/code.ex#L159
EvalString = fun(String, Binding) ->
% Converts a given string (char list) into quote expression
% https://github.com/elixir-lang/elixir/blob/v1.2.0/lib/elixir/src/elixir.erl#L252