Skip to content

Instantly share code, notes, and snippets.

@pavelovcharov
pavelovcharov / a-sshAndSwitch.sh
Created March 14, 2022 12:06 — forked from josefglatz/a-sshAndSwitch.sh
Synology cheatsheet: how to query internal Synology postgresql database
# Connect to you NAS with YOUR admin account
ssh yourAdminUserAccount@nas.ip
# go sudo
sudo -i
# switch to user postgres
su - postgres
@pavelovcharov
pavelovcharov / what-forces-layout.md
Created August 18, 2020 08:17 — 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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@pavelovcharov
pavelovcharov / Synology-Diskstation-Git.md
Created February 8, 2020 18:40 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation