Skip to content

Instantly share code, notes, and snippets.

View ThePeach's full-sized avatar

Matteo Pescarin ThePeach

View GitHub Profile
@nikgraf
nikgraf / .eslintrc.js
Last active July 12, 2019 19:11
Prettier / Eslint Setup
module.exports = {
root: true, // make to not take in any user specified rules in parent folders
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'],
env: {
browser: true,
node: true,
jest: true,
},
plugins: ['flowtype'],
@freyes
freyes / gist:dfc3f5232526a62bbc09adc816e0477d
Created April 11, 2016 12:42
bluetoothd: a2dp-sink profile connect failed for AA:BB:CC:DD:EE:00: Protocol not available
Source: https://g751jy.wordpress.com/about/parrot-zik-bluetooth-headset/
https://bbs.archlinux.org/viewtopic.php?id=194006
Cached: http://webcache.googleusercontent.com/search?q=cache:4stTobIXSD0J:https://g751jy.wordpress.com/about/parrot-zik-bluetooth-headset/+&cd=3&hl=en&ct=clnk&gl=us
Bug and possible solution: actually I found a bug in that make the headset unusable, it seems that the pulse audio module: module-bluetooth-discover works only if started after the X11 session is up. So I have a workaround.
Edit the file:
/etc/pulse/default.pa
@stephenway
stephenway / README.md
Last active January 24, 2024 17:19
BEMIT Cheatsheet
@paulirish
paulirish / what-forces-layout.md
Last active March 28, 2024 11:45
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
@fission6
fission6 / Deploy Notes
Last active November 19, 2015 14:16
Deployment notes for Ubuntu Instance Nginx, uwsgi, postgres, django, virtualenv stack
Deployment notes for Ubuntu Instance
Nginx, uwsgi, postgres, django, virtualenv stack
* ssh root
root access (need pem)
ssh -i whatever.pem ubuntu@ec2-*-*-*-*.compute-1.amazonaws.com
* secure box
- cut off all ports but 22 and 80 using AWS Management Console
- edit /etc/ssh/sshd_config ensure PasswordAuthentication no