Skip to content

Instantly share code, notes, and snippets.

View sylweriusz's full-sized avatar

Sylweriusz sylweriusz

View GitHub Profile
#original size was 1920x1080
ffmpeg -i ./file.MOV -s 960x500 -filter:v "crop=1920:1000:0:0" -ss 00:00:50 -t 00:00:10 out.mp4
@sylweriusz
sylweriusz / wulgaryzmy.php
Last active May 9, 2018 20:50
Polish vulgarisms
<?php
$wulgaryzmy_pl = array(
'brandzlować',
'brandzlowali',
'brandzlowaliby',
'brandzlowalibyście',
'brandzlowalibyśmy',
'brandzlowaliście',
'brandzlowaliśmy',
@sylweriusz
sylweriusz / 1. Install Redis
Created November 7, 2017 11:42 — forked from pbolduc/1. Install Redis
Install redis on CentOS 7
# see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/
# --- Compiling ---
$ yum install gcc make tcl
$ REDIS_VER=3.2.3
$ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz
$ tar xzvf redis-$REDIS_VER.tar.gz
$ cd redis-$REDIS_VER
$ make
$ make test
@sylweriusz
sylweriusz / fix-infinality.md
Created January 21, 2017 01:01 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@sylweriusz
sylweriusz / sphinx.conf
Created July 29, 2016 16:01
Example configuration of Sphinx Search
source mysql_db {
type = mysql
sql_host = localhost
sql_user = sphinx
sql_pass = Password_here
sql_db = database_name
sql_query_pre = SET CHARACTER_SET_RESULTS=utf8
sql_query_pre = SET NAMES utf8
# sql_query_pre = SET SESSION query_cache_type=OFF
@sylweriusz
sylweriusz / stopwords.txt
Created July 29, 2016 14:25
Polish stopwords for Sphinx Search
aby ach acz aczkolwiek aj albo ale alez ani az bardziej bardzo bo bowiem by byli bynajmniej byc byl byla bylo byly bedzie beda cali cala caly ci cie ciebie co cokolwiek cos czasami czasem czemu czy czyli daleko dla dlaczego dlatego do dobrze dokad dosc duzo dwa dwaj dwie dwoje dzis dzisiaj gdy gdyby gdyz gdzie gdziekolwiek gdzies ich ile im inna inne inny innych iz ja ja jak jakas jakby jaki jakichs jakie jakis jakiz jakkolwiek jako jakos je jeden jedna jedno jednak jednakze jego jej jemu jest jestem jeszcze jesli jezeli juz ja kazdy kiedy kilka kims kto ktokolwiek ktos ktora ktore ktorego ktorej ktory ktorych ktorym ktorzy ku lat lecz lub ma maja malo mam mi mimo miedzy mna mnie moga moi moim moja moje moze mozliwe mozna moj mu musi my na nad nam nami nas nasi nasz nasza nasze naszego naszych natomiast natychmiast nawet nia nic nich nie niech niego niej niemu nigdy nim nimi niz no obok od okolo on ona one oni ono oraz oto owszem pan pana pani pod podczas pomimo ponad poniewaz powinien powinna powinni powinno
@sylweriusz
sylweriusz / Documentation.md
Created May 13, 2016 23:17 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@sylweriusz
sylweriusz / arch-linux-install
Created March 7, 2016 21:50 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
<?php private function connect()
{
if (!$this->memcached)
{
$this->memcached = new Memcached('pool');
$this->memcached->setOption(Memcached::OPT_COMPRESSION, true);
if (count($this->memcached->getServerList()) < 1)
{
$this->memcached->addServer('127.0.0.1', 11211, 33);