Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@0xff00ff
0xff00ff / dockerfile
Created December 26, 2019 16:30
dockerfile front (vue)
FROM node:8.15-alpine AS builder
WORKDIR /usr/src/app
RUN apk add --no-cache git python krb5 krb5-libs gcc make g++ krb5-dev
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
COPY . .
RUN rm -rf node_modules
RUN npm install
RUN npm run build
FROM nginx
RUN rm /etc/nginx/conf.d/*.conf
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 25
maligned:
suggest-new: true
dupl:
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
exclude:
- .dart_tool/**
- .idea/**
- .pub/**
- .settings/**
#порезать видео на 2 части начиная с 47 сек и длительностью 12 сек
ffmpeg -i 'from.mp4' -ss 00:00:47.00 -t 00:00:12.00 -async 1 -strict -2 'result.mp4'
# слепить видео из двух частей
ffmpeg -i part1.mp4 -i part2.mp4 -filter_complex '[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]' -map '[v]' -map '[a]' -strict -2 'result.mp4'
@0xff00ff
0xff00ff / .htaccess
Created February 24, 2015 11:04
htaccess redirect requests
Options -Indexes +SymLinksIfOwnerMatch
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} /
# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /twitpic4/public/$1 [L]
<?php
$basePrices = [
"6,00 € /l" => ['price' => '6,00', 'volume' => '1', 'unit' => 'l'],
"1.88 € / 100 g" => ['price' => '1.88', 'volume' => '100', 'unit' => 'g'],
"1.15 € / 100 gr" => ['price' => '1.15', 'volume' => '100', 'unit' => 'gr'],
"2.33 € / 1 kg" => ['price' => '2.33', 'volume' => '1', 'unit' => 'kg'],
"2.33 € / kg" => ['price' => '2.33', 'volume' => '1', 'unit' => 'kg'],
"0,70 € / 10St" => ['price' => '0,70', 'volume' => '10', 'unit' => 'St'],
"2.49 € / Stück" => ['price' => '2.49', 'volume' => '1', 'unit' => 'Stück'],