This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { applyDecorators } from '@nestjs/common'; | |
import { ApiExtraModels, ApiQuery, getSchemaPath } from '@nestjs/swagger'; | |
/** | |
* Combines Swagger Decorators to create a description for `filters[name]=something` | |
* - has support for swagger | |
* - automatic transformation with nestjs | |
*/ | |
// eslint-disable-next-line @typescript-eslint/ban-types,@typescript-eslint/explicit-module-boundary-types | |
export function ApiFilterQuery(fieldName: string, filterDto: Function) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a new token to track logged in users | |
express.logger.token('user', function(req, res){ | |
// req.user is the deault passport.js variable, log the user id | |
return req.user ? req.user._id : '-'; | |
}); | |
// use this function on Heroku to get the remote IP | |
express.logger.token('ip', function(req, res){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import { spawn } from 'child_process'; | |
import { join } from 'path'; | |
import yargs from 'yargs'; | |
import { hideBin } from 'yargs/helpers'; | |
async function runCommand(data: { stage: string }, ...args) { | |
// eslint-disable-next-line no-console | |
console.log( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet Custom Simple Map Example</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-1.0.0-b1/leaflet.css" /> | |
<link rel="stylesheet" href="https://cdn.rawgit.com/ardhi/Leaflet.MousePosition/master/src/L.Control.MousePosition.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
:tabindex="searchable ? -1 : tabindex" | |
:class="[isOpen?'active':'', disabled?'disabled':'', size && size !== 'default'? 'multiselect-'+size : '' ]" | |
@focus="activate()" | |
@keydown.self.down.prevent="pointerForward()" | |
@keydown.self.up.prevent="pointerBackward()" | |
@keydown.enter.tab.stop.self="addPointerElement($event)" | |
@keyup.esc="deactivate()" | |
class="multiselect"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name eDavki eKartica - Malenkost boljši izvoz | |
// @version 1.4 | |
// @description Na eKartici portala eDavki doda nov gumb, "Alt. CSV", ki vrne UTF-8 CSV datoteko v standardni obliki datuma. Uporaba na lastno odgovornost. | |
// @author Marko Zabreznik | |
// @match https://edavki.durs.si/EdavkiPortal/[*]/PersonalPortal/CommonPages/Documents/eKartica.aspx?RepresentedTaxPayerProfileId=*&form=eKartica | |
// @grant none | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
.serverless | |
.vscode | |
*.config.js | |
_warmup | |
**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* | |
N-Gram-Based Text Categorisation | |
Implementation by marko@zabreznik.net | |
28.3.2015 All rights reserved. | |
Based on the paper by: | |
William B. Cavnar and John M. Trenkle | |
Environmental Research Institute of Michigan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hitri Nakup Notifier | |
// @version 0.1 | |
// @description Doubleclick on date to start (the button will get a pulsing effect ans start clicking when done) | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js | |
// @match https://hitrinakup.com/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle(` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create updates.json for offline automatic updates | |
* https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Updates | |
* | |
* Usage: | |
* node update-dist.js [path to .xpi files] [path to update.json] [url prefix to .xpi files] | |
* | |
* Author: | |
* marko@zabreznik.net | |
*/ |
NewerOlder