Skip to content

Instantly share code, notes, and snippets.

@Bogdaan
Bogdaan / iterm2.md
Created May 18, 2018 06:43 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
@Bogdaan
Bogdaan / downgrademysql.md
Created June 12, 2017 16:06 — forked from Voronenko/downgrademysql.md
Downgrade mysql to mysql 5.6 on xenial

Install MySQL 5.6 in Ubuntu 16.04

Ubuntu 16.04 only provides packages for MySQL 5.7 which has a range of backwards compatibility issues with code written against older MySQL versions.

Oracle maintains a list of official APT repositories for MySQL 5.6, but those repositories do not yet support Ubuntu 16.04. However, the 15.10 repos will work for 16.04.

Uninstall existing mysql 5.7 if any

sudo apt remove mysql-client mysql-server libmysqlclient-dev mysql-common
@Bogdaan
Bogdaan / gist:0b6dae721f1c9d9b6346
Created September 29, 2015 15:23 — forked from realmyst/gist:1262561
Склонение числительных в javascript
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);
/**
* Generate keyframe for CSS3 animation
* ios bounce icon effect
* @size = bounce size (sample: 10)
* @onFrames = % time on frames (for delay or other effect 0-100) (sample: 50)
*/
function buildFrames(size, onFrames)
{
var source = ["0", "60", "83", "100", "114", "124", "128", "128", "124", "114", "100", "83", "60", "32", "0", "0", "18", "28", "32", "28", "18", "0"];