Skip to content

Instantly share code, notes, and snippets.

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

Stefan Majiros majirosstefan

🏠
Working from home
View GitHub Profile
LA: https://is.stuba.sk/katalog/syllabus.pl?odkud=;zobrazit_sklad=0;zobrazit_obdobi=0;obdobi=;predmet=335989;typ=1;jazyk=3;vystup=1;lang=sk
AJ1: https://is.stuba.sk/katalog/syllabus.pl?odkud=;zobrazit_sklad=0;zobrazit_obdobi=0;obdobi=;predmet=333894;typ=1;jazyk=3;vystup=1;lang=en
AJ2: https://is.stuba.sk/katalog/syllabus.pl?predmet=281720;jazyk=1;lang=en
ALPR: https://is.stuba.sk/katalog/syllabus.pl?odkud=;zobrazit_sklad=0;zobrazit_obdobi=0;obdobi=;predmet=323695;typ=1;jazyk=3;vystup=1;lang=en
AP: https://is.stuba.sk/katalog/syllabus.pl?odkud=;zobrazit_sklad=0;zobrazit_obdobi=0;obdobi=;predmet=313994;typ=1;jazyk=3;vystup=1;lang=en
BEZ: https://is.stuba.sk/katalog/syllabus.pl?predmet=313176;jazyk=1;lang=sk
FYZ1: https://is.stuba.sk/katalog/syllabus.pl?odkud=;zobrazit_sklad=0;zobrazit_obdobi=0;obdobi=;predmet=281697;typ=1;jazyk=3;vystup=1;lang=en
FYZ2: https://is.stuba.sk/katalog/syllabus.pl?odkud=;zobrazit_sklad=0;zobrazit_obdobi=0;obdobi=;predmet=334002;typ=21;jazyk=3;vystup=1;lang=sk
LSI: https://is.
@PostMapping("/savefile")
public ResponseEntity<String> handleFileUpload(@RequestParam("file") MultipartFile file) {
String message;
try {
Path imagePath = this.rootLocation.resolve(file.getOriginalFilename())
// print path
System.out.println("Storing image to:" + resolvedPath);
Files.copy(file.getInputStream(), imagePath);
files.add(file.getOriginalFilename());
@majirosstefan
majirosstefan / get-medium-stats.js
Created February 14, 2021 12:53 — forked from igeligel/get-medium-stats.js
medium-get-totals
const totalTypes = {
VIEWS: 2,
READS: 3,
FANS: 5
};
const getTotal = tableColumn =>
[
...document.querySelectorAll(
`td:nth-child(${tableColumn}) > span.sortableTable-number`
@majirosstefan
majirosstefan / 0-startup-overview.md
Created March 22, 2021 23:14 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@majirosstefan
majirosstefan / package.json
Created March 26, 2021 20:10 — forked from jthomas/package.json
Using TensorFlow.js with MobileNet models for image classification on Node.js
{
"name": "tf-js",
"version": "1.0.0",
"main": "script.js",
"license": "MIT",
"dependencies": {
"@tensorflow-models/mobilenet": "^0.2.2",
"@tensorflow/tfjs": "^0.12.3",
"@tensorflow/tfjs-node": "^0.1.9",
"jpeg-js": "^0.3.4"
@majirosstefan
majirosstefan / lambda-image-resizer.js
Created April 2, 2021 11:39 — forked from mkuklis/lambda-image-resizer.js
AWS Lambda for image resizing with sharp
const sharp = require('sharp');
const aws = require('aws-sdk');
const s3 = new aws.S3();
const Bucket = "BucketName";
const transforms = [
{ name: 'small', size: 85 },
{ name: 'medium', size: 160 },
{ name: 'large', size: 250 },
];
import 'react-native-get-random-values'
import {AppRegistry, Platform} from 'react-native';
import {name as appName} from './app.json';
import App from './src/setup/index.rootComponent.js';
// new Array(10) does not work
// Supported Array types from docs - https://www.npmjs.com/package/react-native-get-random-values;
// typedArray - Is an integer-based TypedArray, that is an
// Int8Array, a Uint8Array, an Int16Array,a Uint16Array, an Int32Array, or a Uint32Array.
// All elements in the array are going to be overridden with random number
@majirosstefan
majirosstefan / ios_img_gen.js
Created June 10, 2021 22:37 — forked from luveti/ios_img_gen.js
Generate iOS icons and splashscreen images from an svg, using nodejs and phantomjs.
#!/usr/bin/env node
const path = require("path")
const fs = require("fs")
// https://gist.github.com/luveti/67a1c93be3d58b085f6c76ae876c556c
function installDeps(deps, quiet, cb) {
const hash = require('crypto').createHash('md5').update(__filename).digest('hex')
const dir = require('os').tmpdir() + require('path').sep + hash
try {
func RCTLogError(_ message: String, _ file: String=#file, _ line: UInt=#line) {
RCTSwiftLog.error(message, file: file, line: line)
}
func RCTLogWarn(_ message: String, _ file: String=#file, _ line: UInt=#line) {
RCTSwiftLog.warn(message, file: file, line: line)
}
func RCTLogInfo(_ message: String, _ file: String=#file, _ line: UInt=#line) {