Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
brew install wine winetricks
WINEARCH=win32 WINEPREFIX=~/.wine winecfg
mkdir ~/.cache/winetricks/
winetricks settings fontsmooth=rgb
winetricks -q dotnet45 corefonts tahoma
@whisk
whisk / libmfx.pc
Created January 26, 2018 10:27
libmfx.pc for building ffmpeg with qsv support
# copy to $HOME/ffmpeg_build/lib/pkgconfig/libmfx.pc
# see https://trac.ffmpeg.org/wiki/CompilationGuide
prefix=/opt/intel/mediasdk
exec_prefix=${prefix}
libdir=${prefix}/lib/lin_x64
includedir=${prefix}/include
Name: libmfx
Description: Intel Media Server Studio SDK
Version: 16.5
@whisk
whisk / build.sh
Last active January 10, 2018 11:37
building ffmpeg statically with x264 and libfdk_aac
# for Debian 9 (Stretch)
# roughly based on https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
sudo apt-get -y install pkg-config git build-essential autoconf libtool
cd $HOME/src/fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffbuild" --disable-shared
make && make install
@whisk
whisk / gist:3316f3de071de8ce9c15f06df0dfead5
Last active February 1, 2019 13:07
git diff with cp1251 support
git config --local core.pager "iconv -f cp1251 -t utf-8 | less"
@whisk
whisk / ansible-bootstrap-ubuntu-16.04.yml
Created May 17, 2017 15:03 — forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@whisk
whisk / git-subtree.md
Last active April 3, 2017 13:14
Working with git subtrees

Init a repo:

git init .

Make initial commit - it's required to add a subtree:

echo "git repo with subtrees" > README.md
git add README.md
git commit -m "Initial commit"
@whisk
whisk / factory_girl_rails_c.rb
Created March 11, 2017 10:54
FactoryGirl in Rails console
# after loading Rails console
require 'factory_girl_rails'
include FactoryGirl::Syntax::Methods
@whisk
whisk / README.md
Last active March 10, 2017 17:39
Installing rbenv system-wide with RubyMine and Vagrant support
  1. Follow the instructions to install rbenv system-wide (for Vagrant support you do it in the box):
# create user and groups for rbenv
useradd -U rbenv || true
usermod -G rbenv -a vagrant # add vagrant to rbenv group; discard if you are not using Vagrant

# install rbenv itself
git clone https://github.com/rbenv/rbenv.git /usr/local/rbenv
cd /usr/local/rbenv && ./src/configure && make -C src || true