Skip to content

Instantly share code, notes, and snippets.


Luca Pandini lpand

View GitHub Profile
mortezaadi / persistence.xml
Last active Apr 6, 2021
persistence xml configurations for major databases and jpa providers
View persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=""
<!-- derby -->
CMCDragonkai /
Last active May 11, 2021
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

staltz /
Last active Jun 25, 2021
The introduction to Reactive Programming you've been missing
paulirish /
Last active Jun 25, 2021
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