Skip to content

Instantly share code, notes, and snippets.

@andrejb-dev
andrejb-dev / deadland.js
Last active August 17, 2022 13:42
Simulacia online zapasu na www.immortalfighters.net - da sa spustit lokalne v node.js alebo na stranke https://www.tutorialspoint.com/execute_nodejs_online.php
// ------------------------- DEFINITIONS
var db = {
defaultValues: { A: 0.25, B: 0.6, C: 0.9 },
minimalValues: { A: 0.05, B: 0.1, C: 0.3 },
maximalValues: { A: 0.7, B: 0.95, C: 0.99 },
bonuses: [
{
key: "default",
name: "Bez bonusu",
attack: { levelA: 0, levelB: 0, levelC: 0 },
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHP - Hello, World!</title>
</head>
<body>
<?php
$hitPlace = [
@andrejb-dev
andrejb-dev / cron_job
Created March 11, 2020 14:27
automated shell script to sync folder content (personal photos) to another folder with rsync
0 2 * * * /home/scripts/mirror_photos.sh

Commit convention / guideline

Commit Message Format

Each commit message consists of a header, a body and a footer. The header is mandatory The header has a special format that includes a type, a scope and a subject:

<type>[optional scope]: <subject>
<BLANK LINE>
[optional body]
@andrejb-dev
andrejb-dev / close-process.js
Created February 24, 2020 09:23 — forked from nairihar/close-process.js
Close process, Graceful shutdown, medium
const express = require('express');
const mongoose = require('mongoose');
const app = express();
app.use(express.urlencoded({extended: true}));
app.use(express.json());
mongoose.connect('mongodb://localhost/test', (err) => {
if (err) throw err;
console.log('Mongoose connected!');
@andrejb-dev
andrejb-dev / git_new_local_remote_branch
Created November 25, 2019 12:58
GIT creating and pushing branch upstream
# create new branch and switch to it
git checkout -b <branch_name>
# push the branch to the remote repository origin and tracks it
git push -u origin HEAD
@andrejb-dev
andrejb-dev / Main.java
Last active September 22, 2015 11:45 — forked from jewelsea/Main.java
Small JavaFX framework for swapping in and out child panes in a main FXML container. Code is for Java 8+.
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import java.io.IOException;
/**
* Main application class.