Skip to content

Instantly share code, notes, and snippets.


Sudipta Mondal sudiptamondal

View GitHub Profile
sudiptamondal / read_json_in_macrocode.vb
Created Feb 25, 2020
Code snippet to loop through JSON data
View read_json_in_macrocode.vb
Dim jsonObject As Object, item As Variant
Set jsonObject = JsonConverter.ParseJson(strResponse)
For Each item In jsonObject
'do something with json object
Next item
sudiptamondal / GET_REQ_VIA_MACRO.vb
Created Feb 25, 2020
Code Snippet to send GET Request via function in Excel Macro
Private Sub FetchData()
Dim objRequest As Object, strUrl As String, blnAsync As Boolean, strResponse As String
Dim jsonObject As Object, item As Variant
Set objRequest = CreateObject("MSXML2.XMLHTTP")
strUrl = "<URL_GOES_HERE>"
blnAsync = True
With objRequest
.Open "GET", strUrl, blnAsync
sudiptamondal / read_sql_fetch_cols.rb
Created Feb 25, 2020
Code snippet to fetch column names between select and from keyword to analyse.
View read_sql_fetch_cols.rb
def analyse file_path
file =, "r")
counter = 0 # counter for having a 2D Array
writefile = false
array =
file.readlines.each do |line|
if line.start_with? "SELECT"
writefile = true;
array[counter] =
final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
final NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "1000111")
.setContentTitle("Notification Title")
.setContentText("Notification Text")
private void createNotificationChannel() {
NotificationChannel channel = new NotificationChannel("1000111", "cld_notif_channel", NotificationManager.IMPORTANCE_DEFAULT);
NotificationManager notificationManager = getSystemService(NotificationManager.class);
sudiptamondal /
Last active Dec 19, 2015
MongoDB Class. Install mongo driver to connect with ruby source files. Part 1 - Install gem
# Steps
# 1. Install the gem mongo
gem install mongo
gem install bson_ext
# bson_ext is for optimal performance of using mongodb.
# You can still use mongo without it.
# But then, it will throw a warning.
# you you skip rdoc and ri using
# gem install mongo --no-rdoc --no-ri
sudiptamondal /
Created Jul 8, 2013
Complementing a tutorial video with ruby code. Part 3. Running the code
# just simply run the ruby file that we created.
ruby hello_world.rb
sudiptamondal / hello_world.rb
Last active Dec 19, 2015
Complementing a tutorial video with ruby code. Part 2. Hello World
View hello_world.rb
# hello_world.rb
# This will manage routes and display the content.
# I am sure, you did watch the video before checking this out.
require "sinatra"
set :bind, ''
set :port, '8080'
get '/hello/:name' do
You can’t perform that action at this time.