Skip to content

Instantly share code, notes, and snippets.

View CemalUnal's full-sized avatar
🎯
Focusing

Cemal Ünal CemalUnal

🎯
Focusing
  • Ankara, Turkey
View GitHub Profile
@CemalUnal
CemalUnal / sample-mongo-commands.json
Created October 10, 2017 05:57 — forked from jatinchauhann/sample-mongo-commands.json
Mondo DB useful commands for beginners. Adapted from a YouTube Video - https://www.youtube.com/watch?v=pWbMrx5rVBE
//after installing mondodb
//cd to the 'bin' directory of the mongodb folder
//run the following commands in the cmd (run as administrator -for Windows)
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --logappend --rest --install
//to start the mongodb service
net start MongoDB
//to enter mongodb service (this is necessary to start the mongo service)
mongo
@CemalUnal
CemalUnal / SpringBootCorsFilter
Last active August 28, 2018 11:00 — forked from juhahinkula/SpringBootCorsFilter
CORS filter for Spring Boot
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
@Component
public class CorsFilter extends OncePerRequestFilter {
@CemalUnal
CemalUnal / FIleSystemOperations.java
Created October 21, 2018 06:56 — forked from ashrithr/FIleSystemOperations.java
HDFS FileSystems API example
package com.cloudwick.mapreduce.FileSystemAPI;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@CemalUnal
CemalUnal / FileSystemOperations.java
Created October 21, 2018 07:01 — forked from ashrithr/FileSystemOperations.java
Sample java class illustrating hdfs driver
package com.cloudwick.hdfs;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;