area, base, br, col, embed, hr, img, input, link, meta, source, track, wbr
The spec calls these void elements. These do not require a closing slash.
Custom format for displaying bytes as kb, mb, gb or tb.
Response to a few places on the internet: https://productforums.google.com/forum/#!topic/docs/x_T_N-yRUYg And here: https://stackoverflow.com/questions/1533811/how-can-i-format-bytes-a-cell-in-excel-as-kb-mb-gb-etc
Here is one that I have been using:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
| # Pass the env-vars to MYCOMMAND | |
| eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
| # … or ... | |
| # Export the vars in .env into your shell: | |
| export $(egrep -v '^#' .env | xargs) |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.
Set up the encoders as shown:
| @function parse-dotless($class) { | |
| $this: quote($class); | |
| @return if(str-slice($this, 0, 1) == ".", str-slice($this, 2, str-length($this)), $this); | |
| } | |
| /* | |
| example usage: | |
| .14px { | |
| font-size: parse-dotless(#{&}); // will strip the class from .14px to return 14px; | |
| } |
| function decomposeMatrix(m) { | |
| var t,r,s,k,E,F,G,H,Q,R,sx,sy,a1,a2,theta,phi,sqrt=Math.sqrt,atan2=Math.atan2; | |
| // http://math.stackexchange.com/questions/861674/decompose-a-2d-arbitrary-transform-into-only-scaling-and-rotation | |
| // | |
| // It works wonderfully! Thanks. | |
| // The input matrix is transposed though, | |
| // so let me spell the solution out. | |
| E=(m[0]+m[3])/2 |
Dockerfile that is based on your production image and
simply install xdebug into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |
| var EventEmitter = require('events').EventEmitter, | |
| _ = require('lodash'); | |
| /** | |
| * Creates an action functor object | |
| */ | |
| exports.createAction = function() { | |
| var action = new EventEmitter(), | |
| eventLabel = "action", |
| var easing = { | |
| linear : function (t){ | |
| return t; | |
| }, | |
| easeInQuad: function (t) { | |
| return t*t; | |
| }, | |
| easeOutQuad: function (t) { | |
| return -1 *t*(t-2); | |
| }, |