Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View KarelWintersky's full-sized avatar

Karel Wintersky KarelWintersky

View GitHub Profile
@KarelWintersky
KarelWintersky / television_resolution_standards.md
Created December 17, 2016 15:40 — forked from jonlabelle/television_resolution_standards.md
Digital and analog television standards resolution reference.

Television Standards

Digital and analog television standards resolution reference.

Digital TV Standards

Standard Resolution (dots × lines) DAR (H:V) Pixels
PixelVision 120 × 90 4:3 10,800
@KarelWintersky
KarelWintersky / mysql.sh
Created September 6, 2016 16:13 — forked from valerio-bozzolan/mysql.sh
Debian GNU/Linux MySQL-MariaDB autologin
#!/bin/bash
########################################
# MySQL | MariaDB autologin
# License: GNU GPL v3+
# Author: Valerio Bozzolan
########################################
file=/etc/mysql/debian.cnf
while [ -z "$user" ] && read ln; do
@KarelWintersky
KarelWintersky / ffmpeg.md
Created August 21, 2016 18:04 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Extract Audio

ffmpeg -i video.mp4 -f mp3 -ab 192000 -vn music.mp3

The -i option in the above command is simple: it is the path to the input file. The second option -f mp3 tells ffmpeg that the ouput is in mp3 format. The third option i.e -ab 192000 tells ffmpeg that we want the output to be encoded at 192Kbps and -vn tells ffmpeg that we dont want video. The last param is the name of the output file.


@KarelWintersky
KarelWintersky / !Как установить сфинкс.md
Created April 10, 2016 03:13 — forked from codedokode/!Как установить сфинкс.md
Как установить и настроить сфинкс.

Как установить и настроить сфинкс.

Скачиваем сфинкс (берем версию с MySQL и со стеммингом на 15 языков Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support соответствующую битности твоей ОС), распаковываем например в d:\temp\s\

На этом установка sphinx завершена. В дебиане просто делаем sudo apt-get install sphinxsearch.

Создаем таблицы:

CREATE TABLE news 

(id INT(10) AUTO_INCREMENT PRIMARY KEY, topic INT(10) NOT NULL, header VARCHAR(200) NOT NULL,

@KarelWintersky
KarelWintersky / Russian Plural Form in PHP
Last active August 15, 2016 05:20 — forked from fomigo/gist:2382775
Russian Plural Form in PHP
<?php
/*
echo plural_form(42, array('арбуз', 'арбуза', 'арбузов'));
*/
function plural_form($n, $forms) {
return $n%10==1&&$n%100!=11?$forms[0]:($n%10>=2&&$n%10<=4&&($n%100<10||$n%100>=20)?$forms[1]:$forms[2]);
}
@KarelWintersky
KarelWintersky / auntAsya.php
Created October 11, 2015 21:13 — forked from M1zh0rY/auntAsya.php
Тетя ася
<?php
/**
* @name Aunt Asya has arrived =)
* @author M1zh0rY
* @category js clear script
* Infected Script:
* JS/Agent.* (all, ESET)
* JS/Kryptik.LP (ESET)
* Trojan:JS/BlacoleRef.BC (MCE)
* @license GNU
@KarelWintersky
KarelWintersky / csv_to_array.php
Created October 11, 2015 21:08 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
/**
* Convert a comma separated file into an associated array.
* The first row must contain the array keys.
* Return something like this:
* Array
(
[0] => Array
(
[name] => Lorem
[number] => 11