Skip to content

Instantly share code, notes, and snippets.

View ollar's full-sized avatar
🎯
Focusing

Oleg Larkin ollar

🎯
Focusing
View GitHub Profile
@ollar
ollar / ffmpeg.md
Created September 8, 2023 09:39 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@ollar
ollar / what-forces-layout.md
Created December 3, 2018 15:49 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@ollar
ollar / parallel
Last active February 3, 2017 11:38
function parallel() {
let args = Array.prototype.slice.call(arguments);
let length = args.length;
let funcsComplete = 0;
let resFunc;
let results = [];
function complete(res) {
funcsComplete += 1;
results.push(res);
import urllib2
import httplib2
from sgmllib import SGMLParser
request = urllib2.Request('http://bash.im')
userAgent = 'Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0'
opener = urllib2.build_opener()
request.add_header('User-agent', userAgent)
@ollar
ollar / timer.py
Last active January 1, 2016 16:29
timer
#! /usr/bin/env python
import os
pomidorro = int
def log(pomidorro):
from datetime import datetime
try:
logs = open('Pomidorro_logs','a')
@ollar
ollar / colors
Created November 12, 2013 09:46
Vim colors dictinary
AliceBlue
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
@ollar
ollar / css
Created November 12, 2013 09:44
Vim css dictionary
-moz-binding
-moz-border-bottom-colors
-moz-border-left-colors
-moz-border-radius
-moz-border-radius-bottomleft
-moz-border-radius-bottomright
-moz-border-radius-topleft
-moz-border-radius-topright
-moz-border-right-colors
-moz-border-top-colors
@ollar
ollar / Timer
Last active December 26, 2015 10:19
Console pomodoro
#!/bin/bash
echo -n "How many minutes would you like the timer to run? "
read limit
echo
echo "Timing $limit minutes..."
echo
counter=0
while [ $counter != $limit ]; do
let "remain = $limit - $counter";
let "slice = $remain%5"
#!/bin/bash
echo -n "Hello. This is a Drupal installation script. "
echo -n "Downloading Drupal..."
drush dl drupal -y
mv drupal-* drupal
cd drupal
echo -n "Please type the database login: "
read login
echo -n "... and database password: "
{
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Bright.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",