Skip to content

Instantly share code, notes, and snippets.

View JyotinderSingh's full-sized avatar
:octocat:
Building and breaking things

Jyotinder Singh JyotinderSingh

:octocat:
Building and breaking things
View GitHub Profile
@JyotinderSingh
JyotinderSingh / MergeIntervals.cpp
Created July 29, 2020 09:02
Merge Intervals (LeetCode) | Interview Question Explanation
// https://leetcode.com/problems/merge-intervals/
class Solution
{
public:
vector<vector<int>> merge(vector<vector<int>> &intervals)
{
sort(intervals.begin(), intervals.end(), [](auto &vec1, auto &vec2) {
// if the start timings are equal
if (vec1[0] == vec2[0])
{
diff --git a/compiler/build.gradle b/compiler/build.gradle
index 60d3a436f..409df7a03 100644
--- a/compiler/build.gradle
+++ b/compiler/build.gradle
@@ -31,6 +31,7 @@ def addLibraryIfNotLinked = { libName, argList ->
}
def String arch = rootProject.hasProperty('targetArch') ? rootProject.targetArch : osdetector.arch
+// arch = arch.replace('osx_arm-v8', 'osx_aarch64')
def boolean vcDisable = rootProject.hasProperty('vcDisable') ? rootProject.vcDisable : false
@JyotinderSingh
JyotinderSingh / oktaLogin.js
Created December 16, 2021 07:03 — forked from ndavis/oktaLogin.js
Cypress Custom Command for Okta Login
Cypress.Commands.add('loginOkta', () => {
const optionsSessionToken = {
method: 'POST',
url: Cypress.env('session_token_url'),
body: {
username: Cypress.env('username'),
password: Cypress.env('password'),
options: {
warnBeforePasswordExpired: 'true'
}
@JyotinderSingh
JyotinderSingh / script.sh
Created April 11, 2024 06:40
Jupyter Notebook Auto Complete: Install hinterland for conda
conda activate <env_name>
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter nbextensions_configurator enable --user
jupyter contrib nbextension install --user
jupyter nbextension enable hinterland/hinterland
@JyotinderSingh
JyotinderSingh / leaderboard.go
Created October 12, 2024 15:02
leaderboard
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"math/rand"
"net/http"
"os"
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/dicedb/dicedb-go"