Skip to content

Instantly share code, notes, and snippets.

@burasuk
burasuk / backup.sh
Created June 25, 2020 10:47
simple differential backup based on tar
#!/bin/sh
DATE=`date +%Y-%m-%d__%H-%M`
BACKUP_NAME=$DATE.tar.gz
DIR_TO_BACKUP='dir/to/backup'
# next differential backup
tar -czg snapshot.snar -f $BACKUP_NAME $DIR_TO_BACKUP
@burasuk
burasuk / what-forces-layout.md
Created January 31, 2019 12:36 — 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()
@burasuk
burasuk / main.go
Created April 8, 2018 20:54
GO Demo - GitGo CLI
// "Package main" is the namespace declaration
// "main" is a keyword that tells GO that this project is intended to run as a binary/executable (as opposed to a Library)
package main
// importing standard libraries & third party library
import (
"fmt"
"os"
"strings"