Skip to content

Instantly share code, notes, and snippets.

View bashkirtsevich's full-sized avatar
:octocat:
bashkirtsevich.github.io

D.A.Bashkirtsev bashkirtsevich

:octocat:
bashkirtsevich.github.io
View GitHub Profile
@bashkirtsevich
bashkirtsevich / share.txt
Last active November 23, 2016 09:58
share with pluso.ru
https://share.pluso.ru/process?act=share&u=URL&k=c5BTI0utUNLNFTOn&type=SN&t=TEXT_MESSAGE&img=IMG_URL
where SN one of:
vkontakte
odnoklassniki
facebook
twitter
google
moimir
pinterest
/**
* FFmpeg sample player
* Related to the article at http://habrahabr.ru/blogs/video/137793/
*/
#include <stdio.h>
#include <SDL.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
@bashkirtsevich
bashkirtsevich / ffplay.c
Created November 23, 2016 10:03
ffplay source code
/*
* Copyright (c) 2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@bashkirtsevich
bashkirtsevich / sdl_sound.c
Created November 23, 2016 10:10
SDL sound
/* from http://stackoverflow.com/questions/10110905/simple-wave-generator-with-sdl-in-c */
#include <SDL/SDL.h>
#include <SDL/SDL_audio.h>
#include <queue>
#include <cmath>
const int AMPLITUDE = 28000;
const int FREQUENCY = 44100;
@bashkirtsevich
bashkirtsevich / sdl_test.pas
Last active November 23, 2016 11:08
Delphi SDL2 sound generator
unit sdl_test;
interface
uses
System.Classes, System.Generics.Collections, System.Math,
sdl2;
procedure main;
@bashkirtsevich
bashkirtsevich / mix.pas
Created November 24, 2016 10:33
Function to mix audio channels
procedure Mix(ADest: PByte; ASources: array of PByte; ASize, ALength: Integer);
var
i, j: Integer;
begin
for i := 0 to (ALength - 1) div ASize do
for j := 0 to Length(ASources) - 1 do
begin
Move(ASources[j]^, ADest^, ASize);
Inc(ADest, ASize);
(*
3 потока, один ждет сигнал, при срабатывании сигнала вытягивает из очереди значения, остальные потоки через критическую
секцию ставят в очередь значения (один положительную прогрессию, второй — отрицательную)
*)
unit main_u;
interface
uses
@bashkirtsevich
bashkirtsevich / pentaho_links.md
Last active December 22, 2016 11:23
Pentaho tutorials
@bashkirtsevich
bashkirtsevich / mongo_import.sh
Last active November 30, 2016 18:06
Import CSV file to mongo
mongoimport --db mybase --collection mycollection --type csv --headerline --file file.csv
@bashkirtsevich
bashkirtsevich / jasper_install.md
Last active March 15, 2017 09:33
Jasper links

Установка Jasper iReport

  • Скачиваем iReport
  • Скачиваем jre-7u67-windows-x64.tar.gz
  • Распаковываем архив в папку с iReport
  • Открываем на редактирование файл:
\iReport-5.6.0\etc\ireport.conf
  • Прописываем в файле следующее: