Skip to content

Instantly share code, notes, and snippets.

View sumanmukherjee03's full-sized avatar

Suman Mukherjee sumanmukherjee03

View GitHub Profile
@sumanmukherjee03
sumanmukherjee03 / barewords.rb
Created May 21, 2013 19:51
Implementation of Greeting Message application and barewords
require 'rspec'
require 'forwardable'
RSpec.configure do |config|
config.mock_with :rspec
config.color_enabled = true
end
def program_name
"Greeting Messages"
@sumanmukherjee03
sumanmukherjee03 / array_ext.rb
Last active December 17, 2015 17:19
Extend the array class with merge_sort and binary_search
require 'rspec'
RSpec.configure do |config|
config.mock_with :rspec
config.color_enabled = true
end
module ArrayExt
def merge_sort
if self.length <= 1
@sumanmukherjee03
sumanmukherjee03 / barewords_example.rb
Created May 24, 2013 18:39
Another example of how to use barewords in ruby.
require 'rspec'
require 'forwardable'
RSpec.configure do |config|
config.mock_with :rspec
config.color_enabled = true
end
module Version
NUMBER = 1
@sumanmukherjee03
sumanmukherjee03 / tree_traversal.rb
Created May 24, 2013 19:29
Implementation of preorder, inorder and postorder in a binary tree
require 'rspec'
require 'forwardable'
RSpec.configure do |config|
config.mock_with :rspec
config.color_enabled = true
end
class Node
def initialize(value)
@sumanmukherjee03
sumanmukherjee03 / cipher_encryption_decryption.go
Last active June 10, 2025 11:08
AES GCM example in python and go
package main
import (
"crypto/aes"
"crypto/cipher"
"fmt"
"reflect"
"strconv"
"time"
)

Keybase proof

I hereby claim:

To claim this, I am signing this object: