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
@Controller("/") | |
@ExecuteOn(TaskExecutors.IO) | |
class UploadController { | |
companion object { | |
private val LOG = LoggerFactory.getLogger(UploadController::class.java) | |
private val executor = Executors.newSingleThreadExecutor { | |
Thread(it).apply { | |
name = "processing-thread" | |
} |
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 TABLE track( | |
id SERIAL PRIMARY KEY, | |
name VARCHAR NOT NULL | |
); | |
CREATE TABLE playlist( | |
id SERIAL PRIMARY KEY, | |
name VARCHAR NOT NULL | |
); |
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> | |
<b-navbar toggleable="md" type="dark" variant="primary" | |
class="navbar-shadow mb-3"> | |
<b-container> | |
<b-navbar-brand to="/"> | |
<div class="d-inline-block "> | |
<b-img class="logo-box" style="margin-top: -4px" src="~static/img/ball.svg"></b-img> | |
</div> | |
Теннис онлайн |
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
@file:Repository("https://jcenter.bintray.com") | |
@file:DependsOn("commons-io:commons-io:2.6") | |
import org.apache.commons.io.IOUtils | |
import java.io.FileInputStream | |
println("This script prints source of itself with Apache Commons IO Maven dependency:\n") | |
IOUtils.toString(FileInputStream("./test-01.main.kts"), "UTF-8") |
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 'dart:async'; | |
import 'dart:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:firebase_database/firebase_database.dart'; | |
Future<void> main() async { |
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
package org.mlayer.utils; | |
import android.support.annotation.NonNull; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import ch.qos.logback.classic.AsyncAppender; | |
import ch.qos.logback.classic.Level; | |
import ch.qos.logback.classic.LoggerContext; |
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
public static String plural(long n, String form1, String form2, String form3) { | |
n = Math.abs(n); | |
int plural = (n % 10 == 1 && n % 100 != 11 ? 0 : (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)); | |
switch (plural) { | |
case 1: | |
return form2; | |
case 2: | |
return form3; | |
default: | |
return form1; |
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
# ffmpeg utility usage | |
# file concatenation (join / merge) | |
ffmpeg -f concat -i list.txt -c copy output.mp4 | |
# list.txt (don't forget to remove # from file string): | |
#################### | |
# this is a comment | |
# file './1.mp4' | |
# file './2.mp4' |
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
#!/bin/sh | |
##### Preparations ##### | |
#----------------------- | |
# Description is available at http://mlayer.org/tech/2014/11/25/setup-mac-os-x.html | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install caskroom/cask/brew-cask # makes available to install apps as packages | |
brew tap caskroom/versions # for beta version available through cask |
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
<?php | |
/* | |
Это пример скприпта, который обрабатывает http-уведомление Яндекс.Денег и затем отсылает его по email. | |
Подробнее про http-нотификации здесь: http://api.yandex.ru/money/doc/dg/reference/notification-p2p-incoming.xml | |
Warning! | |
Используется PHP-extension PEAR для отправки email. | |
*/ |