Skip to content

Instantly share code, notes, and snippets.

# Install GCC 4.7.3
sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install -y build-essential
# Install CMake 2.8.10.1
sudo apt-get install -y cmake cmake-curses-gui
wget http://netcologne.dl.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.5/opencv-2.4.5.tar.gz
tar -xf opencv-2.4.5.tar.gz
@karpitsky
karpitsky / locale.json
Created April 15, 2018 21:20 — forked from fabulator/locale.json
List of Facebook locales (from user settings)
{
"so_SO":"Af-Soomaali",
"af_ZA":"Afrikaans",
"az_AZ":"Azərbaycan dili",
"id_ID":"Bahasa Indonesia",
"ms_MY":"Bahasa Melayu",
"jv_ID":"Basa Jawa",
"cx_PH":"Bisaya",
"bs_BA":"Bosanski",
"br_FR":"Brezhoneg",
@karpitsky
karpitsky / Facebook Languange Code list php array
Created April 15, 2018 21:22 — forked from lasida/Facebook Languange Code list php array
Facebook Languange Code list Array PHP for Displaying Select Box necessary
<?php
/**
* Facebook Languange Code list Array PHP.
*
* Locales taken from http://www.facebook.com/translations/FacebookLocales.xml
*
* Last Updated: 22/02/2017
*
* @author Lasida Azis
* Inspiration from SVC Invoke
@karpitsky
karpitsky / macos-ffmpeg-note.md
Last active June 4, 2019 13:00
Enconging macOS's Screen Recording for the web without color changing/washing.

Enconging macOS's Screen Recording for the web without color changing/washing.

Video encoding (Correct colors)

ffmpeg -an -i input.mov -vcodec libx264 -pix_fmt yuv420p -colorspace bt709 -color_trc bt709 -color_primaries bt709 -color_range tv output.mp4

@karpitsky
karpitsky / gist:19fdd082912938661213d03f4209bcad
Last active June 12, 2019 12:09
jpeg optimization without loosing color
cd images/
find . -iname "*.jp*" -print0 | xargs -0 jpegoptim -v --strip-exif --strip-iptc --strip-xmp --all-progressive
@karpitsky
karpitsky / export.py
Last active September 19, 2019 10:26
Export Yandex Translate public collection
import string
import random
import requests
collection_id = '<YOUR COLLECTION ID>'
uid = ''.join(random.choices(string.digits, k=18))
cookies = {
'first_visit_src': 'collection_share_desktop',