Skip to content

Instantly share code, notes, and snippets.

View sumitramteke's full-sized avatar

Sumit Ramteke sumitramteke

View GitHub Profile
@sumitramteke
sumitramteke / Person.java
Last active July 6, 2017 16:18
This will remove Objects from Collection using List of single Attribute (here `String`) by overriding `remove` method
package snippets.model;
public class Person {
private String id;
private String name;
private int age;
public Person(String id, String name, int age) {
this.id = id;
@sumitramteke
sumitramteke / vagrant-aws
Last active August 18, 2016 15:26 — forked from arbabnazar/vagrant-aws
vagrant file for creating an ec2 instance on aws
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "aws"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY']
aws.secret_access_key = ENV['AWS_SECRET_KEY']
@sumitramteke
sumitramteke / ListOfMethod.java
Created August 17, 2016 07:30
List down methods of Java Class
package sumitramteke;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.regex.Pattern;
import java.util.stream.Stream;
public class ListOfMethod {
@sumitramteke
sumitramteke / AsyncHttpReqRes.go
Created July 15, 2016 12:26
Asynchronous HTTP response handling
package main
import (
"fmt"
"net/http"
"time"
)
type HttpResp struct {
Id string
package main
import (
"fmt"
"reflect"
)
type Users struct {
ID string
FirstName string
var Person = function(firstName) {
this.firstName = firstName;
};
Person.prototype.sayHello = function() {
console.log("Hello, I'm " + this.firstName);
};
var person1 = new Person("Alice");
var person2 = new Person("Bob");
@sumitramteke
sumitramteke / Code.gs
Created December 17, 2015 10:27
This will find GMAP Coordinates for list of companies in "HR and Client meeting details" drive sheet
function setCoordinates() {
var coordinateCell = "Q";
var addressCell = "P";
var companyCell = "A";
var coordColNum = 16;
var addrColNum = 15;
var compColNum = 0;
// if true then it will replace coord with new values
@sumitramteke
sumitramteke / sampleJson.json
Last active August 29, 2015 14:27
JSON file sample
{
"items": [
{
"tags": [
"java",
"enums"
],
"owner": {
"reputation": 684,
"user_id": 1831052,
@sumitramteke
sumitramteke / Readme.MD
Last active August 29, 2015 14:20
Email Icons

Email icons

@sumitramteke
sumitramteke / Vagrantfile
Created March 6, 2015 07:36
vagrant procedure for setting chef environment
Vagrant.configure("2") do |config|
# instance identifier for future use
config.vm.box = "vanilaUbuntux64"
# preconfigured Vagrant box, later just use only vanilaUbuntux64
# size is 447 MB
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box"
# shared folder for whithin local system and VM
config.vm.synced_folder "./app" , "/rezoomex", create:true
# static IP for machine
config.vm.network :private_network, ip: "192.168.2.25"