Skip to content

Instantly share code, notes, and snippets.

View marsicdev's full-sized avatar
🏠
Working from home

Marko Arsić marsicdev

🏠
Working from home
View GitHub Profile
var school = {
name: "BIT",
address: "Nemanjina 4",
city: "Belgrade",
isOpen: true,
teachers: ["Marko", "Nenad", "Stanko"],
students: ["Pera", "Mika", "Zika"]
}
var speaker = {
'use strict';
/**
* Represent movie genre
* @constructor
* @param {string} genreName - The genre name
*/
function Genre(genreName) {
// properties
this.name = genreName;
@marsicdev
marsicdev / entities.js
Created October 26, 2017 15:01
Movie form example
function Movie(title, length, genre) {
this.title = title;
this.length = length;
this.genre = genre;
}
Movie.prototype.getInfo = function () {
return this.title + ", " + this.genre;
};
'use strict';
/**
* Represents person
* @constructor
* @param {string} name - First name
* @param {string} surname - Last name
*/
function Person(name, surname) {
this.name = name;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Movie list</title>
<link rel="stylesheet" href="./css/main.css">
</head>
<body>
@marsicdev
marsicdev / app.js
Created October 31, 2017 21:30
Movie list full application with modules example
var dataController = (function () {
var data = {
movies: [],
totalMoviesLength: 0
};
// Movie constructor
function Movie(title, length, genre) {
this.title = title;
{
"meta": {
"limit": 10,
"next": null,
"offset": 0,
"previous": null,
"total_count": 1
},
"drivers": [
{
@marsicdev
marsicdev / movie-form-es6.js
Last active November 2, 2017 21:30
Movie form refactored to ES2015
const dataController = (() => {
const data = {
movies: [],
totalMoviesLength: 0
};
class Movie {
constructor(title, length, genre) {
this.title = title;
@marsicdev
marsicdev / index.html
Created March 9, 2018 17:16
MRP GitHub sample
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
@marsicdev
marsicdev / .eslintrc
Created March 23, 2018 22:36
My Visual Studio Code workspace settings for CRA
{
"extends": [
"react-app"
],
"rules": {
"semi": [
"error",
"never"
],
"quotes": [