Skip to content

Instantly share code, notes, and snippets.

View Enelar's full-sized avatar
💭
https://www.linkedin.com/in/offenso

Kirill Berezin Enelar

💭
https://www.linkedin.com/in/offenso
View GitHub Profile
@Enelar
Enelar / ffmpeg.sh
Created August 25, 2017 11:17
CentOS FFMpeg Installation from Source
#!/bin/sh
rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum -y update
yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel
#YASM
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
@Enelar
Enelar / minterpolate.sh
Last active November 26, 2020 22:00
minterpolate ffmpeg
ffmpeg -i input.mp4 -movflags +faststart -filter_complex "[0:v]minterpolate='fps=60:mi_mode=mci:me_mode=bidir:mc_mode=obmc:me=ds:vsbmc=1'" -preset ultrafast output.mp4
@Enelar
Enelar / compress_jpeg.sh
Created July 11, 2017 15:53
Shrink humongous JPG files in directory recursive
find | egrep \.jp?g? | pv -e -p -t | parallel xargs -n1 mogrify -resize '1080x1080>' -quality '80>'
@Enelar
Enelar / README
Created May 8, 2017 15:38
Compress videos each night. NEVER KILL ffmpeg, otherwise you will lose files.
Each file inside incomming folder would be converted into HVEC/OPUS, with same folder structure into output folder (will be created near).
@Enelar
Enelar / curl.php
Created December 27, 2016 03:28
Curl cookie wrapper
<?php
class curl
{
public $url;
public $__curl;
public $useragent;
public $return_header;
public $result;
@Enelar
Enelar / 99-elevate
Created December 7, 2016 17:51
Workaround lgsosc.com bugs /etc/NetworkManager/dispatcher.d/
#!/bin/bash
IF=$1
STATUS=$2
if [ "$IF" == "vpn0" ]
then
case "$2" in
up)
@Enelar
Enelar / hp.proliant.g3.txt
Created October 29, 2016 16:40
ILO 1.71 connect from OpenSSH 6.2
alias ilossh='ssh -o PasswordAuthentication=yes \
-o ChallengeResponseAuthentication=no \
-o GSSAPIAuthentication=no \
-o HostbasedAuthentication=no \
-o PubkeyAuthentication=no \
-o RSAAuthentication=no \
-o Compression=no \
-o ForwardAgent=no \
-o ForwardX11=no \
-o KexAlgorithms=diffie-hellman-group1-sha1 \
@Enelar
Enelar / preprocessor.foreach.cpp
Created October 6, 2016 23:31
Preprocessor foreach
#define EMPTY()
#define DEFER(func) func EMPTY()
#define EVAL(...) EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
#define EVAL1(...) EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
#define EVAL2(...) EVAL3(EVAL3(EVAL3(__VA_ARGS__)))
#define EVAL3(...) EVAL4(EVAL4(EVAL4(__VA_ARGS__)))
#define EVAL4(...) EVAL5(EVAL5(EVAL5(__VA_ARGS__)))
#define EVAL5(...) __VA_ARGS__
@Enelar
Enelar / compile-php-thread-safe-and-pthreads.sh
Created September 12, 2016 14:22 — forked from Divi/compile-php-thread-safe-and-pthreads.sh
Compile PHP Thread Safe & pthreads extension
#!/usr/bin/env bash
# PARAMETERS
# ----------
# PHP
# ---
PHP_TIMEZONE="UTC"
PHP_DIRECTORY="/etc/php5ts"
@Enelar
Enelar / java.sh
Created August 15, 2016 12:11
Best java options for vps
-XX:+UseParallelGC -Xms10m -Xmx1536m -XX:NewRatio=2