Skip to content

Instantly share code, notes, and snippets.

View omeroot's full-sized avatar
🎯
Focusing

Ömer Demircan omeroot

🎯
Focusing
View GitHub Profile

Markakod Interview Project

We are going to prepare a few simple endpoints where we can monitor where a traveler is walking around in the day and where they have been most recently.

Basic frameworks to be used etc...

  • MongoDB (MongooseJS as adapter)
  • Expressjs
  • Typescript (Optional)
@omeroot
omeroot / router.js
Last active December 16, 2016 19:40
router is non single page sites
function Router ( config ) {
var location = window.location;
var __routes__ = [];
var splatParam = /\*\w+/g;
var namedParam = /:[^\s/]+/g;
var routes = config.routes;
Object.keys( routes ).forEach( function ( item ) {
var handle = config[ config.routes[ item ] ];

#Spring MVC

##Using the Dispatcher Servlet Mechanism

We can say that the core element of Spring MVC is the Dispatcher Servlet.which is the main serv- let that handles all requests and dispatches them to the appropriate channels.

alt tag

#Benefits of the POJO Programming model

The most important advantage of the POJO programming model is that coding application classes is very fast and simple. This is because classes don’t need to depend on any particular API, implement any special interface, or extend from a particular framework class. You do not have to create any special callback methods until you really need them.

Because the POJO‐based classes don’t depend on any particular API or framework code, they can easily be transferred over the network and used between layers. Therefore, you don’t need to create separate data transfer object classes in order to carry data over the network.

You don’t need to deploy your classes into any container or wait for long deployment cycles so that you can run and test them. You can easily test your classes within your favorite IDE using JUnit. You don’t need to employ in‐container testing frameworks like Cactus to perform integration unit tests.

The POJO programming model lets you code with an object‐o

/*
*
* <<<< exclude the lines have same value by you want column on multiple csv files >>>>
*
*
* _ _
* | | (_)
* _ __ __ _ ___ | | __ __ _ __ _ ___ _ ___ ___ _ __
* | '_ \ / _` | / __|| |/ // _` | / _` | / _ \ | |/ __| / _ \ | '_ \
* | |_) || (_| || (__ | <| (_| || (_| || __/ _ | |\__ \| (_) || | | |
#!/bin/bash
#generate dash files
#outputs :
# video_480p_track2_dashinit.mp4
# video_480p_track2_dashinit.mp4
# video_720p_track2_dashinit.mp4
# video_720p_track1_dashinit.mp4
# video_1080p_track2_dashinit.mp4
# video_1080p_track1_dashinit.mp4
#!/bin/bash
#transcode your video and outputs is video_1080p.mp4,video_720p.mp4,video_480p.mp4
output_directory=$1
extention=$2
echo $output_directory
main_video="$output_directory/video.$2"
#!/bin/bash
ffprobe -v quiet -print_format json -show_format -show_streams $1
@omeroot
omeroot / virus-scanner.js
Last active December 29, 2015 07:51
virus scanner. it detect and delete if file extension is exe and file name is same name with its parent folder( useful for external hard disk )
/* ___________________________
* | VIRUS SCANNER |
* |___________________________|
*
*
* >$node virus-scanner.js -b <base path>
* -l <log path>
*
* base path is necessary (-b)
*
@omeroot
omeroot / blacklist-to-excel.js
Last active December 23, 2015 12:45
mongodb collection it contains multi language words(swear) and this util library export this collection to excel and stream to frontend
/*
* EXAMPLE MONGODB BLACKLIST DOCUMENT OBJECT
*
* {
* _id : <mongoId>,
* language: <which language this word>,
* word : <word>
* }
*
* DEPENDENCIES